How to make a different theme for some portlets

I am new to Liferay and I have the following problem. I need to create a portal theme - that's ok, no problem. This will create the default portal and portfolio portlets. But in some of my portlets, I use ZKOSS pages that require completely different styles. My question is, how do I do this so that Liferay themed classes don't affect my ZKOSS pages? There are some common styles in the Liferay theme like for input etc., but I don't want these rules to be applied in my ZKOSS portlets. I hope I have explained clearly. Any suggestions?

+3


source to share


3 answers


You can set <css-class-wrapper>My_Portlet</css-class-wrapper>

in liferay-portlet.xml



see: http://www.liferay.com/community/wiki/-/wiki/Main/Liferay+UI+Guidelines for details

+3


source


I don't know about ZKOSS portlets, but the general way to create a portlet-specific css theme is through the DOM: check your page, see how your portlets are generated ZKOSS: Liferay wraps around each portlet containing a portlet-name, you can use that for styling.

Since I don't have ZKOSS available, here's an example of a certain ugly style applied to each navigation portlet:



 .portlet-navigation .portlet {
       background: purple;
 }

      

Use Firebug or similar tools to find out the appropriate DOM structure and just add the necessary styling for these elements to your theme

+4


source


You can also use Liferay color schemes to define a separate interface for the same portlet.

Liferay 7 / DXP:    https://dev.liferay.com/develop/tutorials/-/knowledge_base/7-0/specifying-color-schemes

Liferay 6.2:

https://dev.liferay.com/develop/tutorials/-/knowledge_base/6-2/specifying-color-schemes

0


source







All Articles