Foros de discusión

Liferay 7/DXP Asset Publisher Portlet customized for a specific site only

Fred Jean, modificado hace 7 años.

Liferay 7/DXP Asset Publisher Portlet customized for a specific site only

New Member Mensajes: 3 Fecha de incorporación: 13/02/13 Mensajes recientes
Hi,

I would like to know if it's possible with Liferay 7 or DXP to customize the Asset publisher portlet, but only for a specific site on the same Liferay instance.

For example, on the same Liferay instance, I would like to have the original Asset publisher portlet on "site A", but on "site B" I would like to have a customized assez publisher with new features. I have this need because on the same portal instance, I have different teams working on different projets/sites and I need the sites to be independant from each other. For instance, I don't want to allow customizations on "site B" that would have a risk to break functionalities for "site A".

Is there something new with OSGI modules that would make such a thing possible?

I know that I could maybe fork entirely the asset-publisher source code for my "site B" (modules/apps/web-experience/asset/asset-publisher-web), but then that source code would be way harder to maintain/upgrade, so it's not an ideal solution.

Doing that for the Asset publisher module was only an example as I have that need for other Liferay core modules as well.

Thanks for your help,

Fred
Fred Jean, modificado hace 7 años.

RE: Liferay 7/DXP Asset Publisher Portlet customized for a specific site on

New Member Mensajes: 3 Fecha de incorporación: 13/02/13 Mensajes recientes
To be more precise, here is a concrete example of modifications that I would like to do to the asset publisher portlet:
- Displaying a list of content filtered with more complex Boolean clauses. For example: I want to display of list of Web Contents that have the category "Sports" AND "News" OR "Event".

Would that be possible to do on a "per-site" basis? If not, any ideas on what would be the best way to implement this for a specific site only? Develop a custom porlet with my special requirements? Fork the asset publisher code?

Thanks,

Fred
thumbnail
David H Nebinger, modificado hace 7 años.

RE: Liferay 7/DXP Asset Publisher Portlet customized for a specific site on

Liferay Legend Mensajes: 14915 Fecha de incorporación: 2/09/06 Mensajes recientes
I wouldn't approach as a "per site" sort of thing. Makes your change dependent upon knowing what site it is working on, coupling logic with data, not a good thing.

However, when I need specializations like this I tend to override not only the page itself but also customization. Add a checkbox to the config like "Use complex filter clauses" and then check the portlet pref on your display. That way the admin drops it on the page, checks the checkbox in config and it applies during rendering. Win/win.





Come meet me at the LSNA!
Fred Jean, modificado hace 7 años.

RE: Liferay 7/DXP Asset Publisher Portlet customized for a specific site on

New Member Mensajes: 3 Fecha de incorporación: 13/02/13 Mensajes recientes
Hi David,

Thanks for your reply. I agree with your solution, it makes sense. However, because of the way that my organization is structured, I don't have all of the flexibility that I want regarding Liferay "core" customizations, because like I said, they might impact multiple projects. There is another group that is in charge of doing modifications to the existing core Liferay components; they have their own product backlog and they control the priority. So I can request that they do a modification to the Asset Publisher portlet, but my project might be over by the time that they deliver it!

So the workaround up to now is to create custom portlets, which makes sense. But by doing that, I do not benefit of all of the existing features of the Asset Publisher portlet for instance, unless I copy/paste the code, which is not ideal because of maintainability issues.

Thus I was wondering if the Liferay version with OSGI could help me in that matter. Maybe I could do something like create a custom portlet, but re-use all of the existing asset publisher features, and override 1 class and 1 JSP for example. That would solve my problem by not modifying the asset publisher portlet for all sites, and by not creating a huge maintainability issue by copy/pasting a lot of code.

What do you think? Is that something that is feasible or we're not there yet in terms of Liferay customizations capabilities?

Thanks,

Fred
thumbnail
David H Nebinger, modificado hace 7 años.

RE: Liferay 7/DXP Asset Publisher Portlet customized for a specific site on

Liferay Legend Mensajes: 14915 Fecha de incorporación: 2/09/06 Mensajes recientes
I think even w/ the osgi model you're still in the same nasty maintenance boat, copying code just to change two files.

OSGi doesn't really give you the kind of "extends" concept that you're aiming for. So you'd still have to copy the code of the original Liferay module(s) and replace your files and then figure out how to maintain this for each additional new release...






Come meet me at the LSNA!