Board index Premium Layouts and Themes Apollo Using apollo layout pages

Using apollo layout pages


Post 17 Nov 2016, 07:08

Posts: 4
Hi! I've recently purchased apollo and im trying to use the layout pages. Am I really required to create the guserPreferences bean? Dont we have an option to use layout and at the same time specify the theme via context param?
Primefaces 6.0
Glassfish 4.1.1
JSF 2.2
Netbeans 8.1

Post 18 Nov 2016, 06:47

Posts: 4
even the template.xhtml from the layout zip refers to guest preference. I cannot make this work out of the box
Primefaces 6.0
Glassfish 4.1.1
JSF 2.2
Netbeans 8.1

Post 18 Nov 2016, 14:46

Posts: 1929
You can remove guestPreferences bean. Then, please add color that you want to use in the layout/theme;
in web.xml
<context-param>
        <param-name>primefaces.THEME</param-name>
        <param-value>apollo-SELECTED_COLOR</param-value> //Exp; <param-value>apollo-blue</param-value>
</context-param>


in template.xhtml
<h:outputStylesheet name="css/layout-blue.css" library="apollo-layout" />

instead of

<h:outputStylesheet name="css/layout-#{guestPreferences.theme}.css" library="apollo-layout" />


etc.

Post 25 Nov 2016, 03:45

Posts: 4
Well, I was hoping we could do away with manually specifying the the layout name since its already in context param. But no problem and thanks for the response!
Primefaces 6.0
Glassfish 4.1.1
JSF 2.2
Netbeans 8.1

Post 25 Nov 2016, 08:38

Posts: 1929
Thanks for the update!


Return to Apollo