Fórumok
Modify portlets custom CSS
Bernd Dose, módosítva 9 év-val korábban
Modify portlets custom CSS
New Member Bejegyzések: 17 Csatlakozás dátuma: 2014.10.01. Legújabb bejegyzések
Hi,
I need to programmatically modify the portlets custom CSS which can be accessed via "Look and Feel -> Advanced Styling -> "Enter your custome CSS" section .
Can anybody tell me if there is an API for that?
I am on version 6.1.2.
Many Thanks
Bernd
I need to programmatically modify the portlets custom CSS which can be accessed via "Look and Feel -> Advanced Styling -> "Enter your custome CSS" section .
Can anybody tell me if there is an API for that?
I am on version 6.1.2.
Many Thanks
Bernd
Ravi Kumar Gupta, módosítva 9 év-val korábban
RE: Modify portlets custom CSS
Liferay Legend Bejegyzések: 1302 Csatlakozás dátuma: 2009.06.24. Legújabb bejegyzések
You need to modify css file or you need to modify the UI which shows that.. ??
If you need to modify anything in already present css.. I would suggest you to create a new theme and apply the theme accordingly.. You get full control of css for portlets as well as for rest of the portal.
In case you need to modify the UI of portlets.. then a jsp hook is suggested.
Look and feel is managed via "Portlet CSS" portlet. See the entry in portlet-custom.xml
If you need to modify anything in already present css.. I would suggest you to create a new theme and apply the theme accordingly.. You get full control of css for portlets as well as for rest of the portal.
In case you need to modify the UI of portlets.. then a jsp hook is suggested.
Look and feel is managed via "Portlet CSS" portlet. See the entry in portlet-custom.xml
<portlet>
<portlet-name>113</portlet-name>
<display-name>Portlet CSS</display-name>
<portlet-class>com.liferay.portlet.StrutsPortlet</portlet-class>
<init-param>
<name>template-path</name>
<value>/html/portlet/portlet_css/</value>
</init-param>
<init-param>
<name>view-action</name>
<value>/portlet_css/view</value>
</init-param>
<expiration-cache>0</expiration-cache>
<supports>
<mime-type>text/html</mime-type>
</supports>
<resource-bundle>com.liferay.portlet.StrutsResourceBundle</resource-bundle>
</portlet>
Bernd Dose, módosítva 9 év-val korábban
RE: Modify portlets custom CSS
New Member Bejegyzések: 17 Csatlakozás dátuma: 2014.10.01. Legújabb bejegyzések
Hi Ravi,
thanks for reply.
I need to programmatically add CSS to the portlet, same way I would do via entering some CSS rules in the Look and Feel -> Advanced Styling -> "Enter your custom CSS"-box.
However I need to achieve this via API at runtime, modifying a portlets XML unfortunatelly isn't an option.
Best regards
Bernd
thanks for reply.
I need to programmatically add CSS to the portlet, same way I would do via entering some CSS rules in the Look and Feel -> Advanced Styling -> "Enter your custom CSS"-box.
However I need to achieve this via API at runtime, modifying a portlets XML unfortunatelly isn't an option.
Best regards
Bernd
Ravi Kumar Gupta, módosítva 9 év-val korábban
RE: Modify portlets custom CSS
Liferay Legend Bejegyzések: 1302 Csatlakozás dátuma: 2009.06.24. Legújabb bejegyzések
Please look at the com.liferay.portlet.portletconfiguration.action.UpdateLookAndFeelAction.
Hope this helps.
Hope this helps.