Page 1 of 1

Alternate Color in Top Bar

Posted: 22 Apr 2015, 21:14
by fabiomarigo
Hi,

When making the change of colors by ThemeView, not this setting the pages "content". "topbar.xhtml and layoutmenu.xhtml are only with the green theme.

Re: Alternate Color in Top Bar

Posted: 22 Apr 2015, 21:36
by cagatay.civici
Not sure what you mean.

Re: Alternate Color in Top Bar

Posted: 22 Apr 2015, 21:44
by fabiomarigo
By changing the colors, does not work from the top menu.

Re: Alternate Color in Top Bar

Posted: 22 Apr 2015, 22:53
by cagatay.civici
Do you try from live showcase? The war and maven project has the working sample, layout files has dummy links.

Re: Alternate Color in Top Bar

Posted: 23 Apr 2015, 14:08
by kukeltje
Happend to me to, took me loooooooong (3 hours) to find out. The template.xhtml in the WEB-INF folder in spark-1.1-layout.zip contains this:

Code: Select all

       <h:outputStylesheet name="css/spark-layout.css" library="spark-layout" />
while the template.xhtml in the WEB-INF folder in the spark-1.1.war contains

Code: Select all

        <h:outputStylesheet name="css/spark-layout#{themeView.color}.css" library="spark-layout" />
using the latter it works.

So unfortunately it is not just 'include' the theme and unzip the layout in the root of your webapp. (can the layout not be made into a web-fragement and included in the theme for the combine theme/layout release)

Re: Alternate Color in Top Bar

Posted: 23 Apr 2015, 14:10
by kukeltje
The latter makes it 'dynamic' if you also use the themeView bean in your example. But maybe the former should be **removed** since I got the impression BOTH were loaded. The theme you configure in the web.xml AND the one from the template where the latter overrides the former!

Re: Alternate Color in Top Bar

Posted: 23 Apr 2015, 16:14
by fabiomarigo
Thank you, worked with the suggested changes.

Re: Alternate Color in Top Bar

Posted: 28 Apr 2015, 11:56
by cagatay.civici
Please also see color alternatives section in documentation;

http://www.primefaces.org/spark/documentation.xhtml

Re: Alternate Color in Top Bar

Posted: 01 May 2015, 01:56
by kukeltje
I read the documentation. But what is missing there is thst the topbar.xhtml has a fixed reference to the green part!!!