« Return to Thread: How to add style to portlet

How to add style to portlet

by dvenkateswara :: Rate this Message:

Reply to Author | View in Thread

I just want to tell how to add style sheet to the pages before some one ask how to do that..

1) Open the file '<EXO-HOME>\webapps\resources\WEB-INF\skin-config.xml'
2) Modify the content

----------------------------------------------
  <portlet-style-config>
    <portlet-name>default</portlet-name>
    <style name="default" url="/resources/skin/portlet/default-portlet.css"/>
    <style name="community" url="/resources/community/skin/community.css"/>
  </portlet-style-config>
-----------------------------------------------

  to
-----------------------------------------------
  <portlet-style-config>
    <portlet-name>default</portlet-name>
    <style name="default" url="/resources/skin/portlet/default-portlet.css"/>
    <style name="community" url="/resources/community/skin/community.css"/>
    <style name="mycompstyle" url="/MyCompPortlet/skin/mycomp-style.css"/>
  </portlet-style-config>


-----------------------------------------------

  Here 'MyCompPortlet' is context where the style sheet is available. For this you also should have a style sheet with name 'myComp-style.css' in the '<EXO-HOME>/webapps/MyCompPortlet/skin/'  directory.

3) Restart the exo-tomcat then you will be able to see your style sheet in the edit properties mode of portlet as below...

 « Return to Thread: How to add style to portlet