How apply theme dark, light or gradient?

Forum rules
Please note that response time for technical support is within 3-5 business days.
Post Reply
mauricio.olieira
Posts: 8
Joined: 20 Dec 2018, 16:21

20 Dec 2018, 16:39

How to apply theme dark, light or gradient without using #{guestPreferences.theme} in web.xml and template.xhtml?

mert.sincan
Posts: 5281
Joined: 29 Jun 2013, 12:38

21 Dec 2018, 08:48

Firstly, you need to choose a color for theme. Exp; blue
in web.xml

Code: Select all

<context-param>
        <param-name>primefaces.THEME</param-name>
        <param-value>california-blue</param-value>
</context-param>


in template.xhtml

Code: Select all

...
 <h:outputStylesheet name="css/nanoscroller.css" library="california-layout" />
 <h:outputStylesheet name="css/layout-blue.css" library="california-layout" />
</h:body>
Then, please choose your menu options; dark, light, gradient

in sidebar.xhtml;

Code: Select all

/* Add these classes to the following <div>; 
*
*   for light -> default
*   for dark ->  'layout-sidebar-dark'
*   for gradient -> 'layout-sidebar-gradient'
*/
 <div class="layout-sidebar"> 
Best Regards,

Post Reply

Return to “California - PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 3 guests