Code issue - Jahia 5 - Multiple stylesheet

Steeve LE PROVOST <[email protected]> Wed, 17 Dec 2008 13:29:58 +0100
Newsgroups gmane.comp.cms.jahia.template
Message-ID <A067E5F1F9EA9C4DBF211E41795A5FC99752F95165@GVAEXCHVS02.europe.firmenich.com>
--===============1287462169==
Content-Language: en-US
Content-Type: multipart/alternative;
	boundary="_000_A067E5F1F9EA9C4DBF211E41795A5FC99752F95165GVAEXCHVS02eu_"

--_000_A067E5F1F9EA9C4DBF211E41795A5FC99752F95165GVAEXCHVS02eu_
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: quoted-printable

Hello everybody,


I need your help concerning Jahia 5.

In fact, I'm looking to give the possibility for an administrator to change=
 the stylesheet of a template (the CSS) for the website.

In order to create this, we can have for example 5 different stylesheets, w=
ith other colors or other text size...When the administrator want to change=
 the look'n'feel of the website, he has only to click on it and the website=
 will be display for the guest like the administrator wants.

I implemented the "Css Choice" with a multivalue list into the popup of the=
 header logo (Where you can also make a choice for the footer). All this co=
de with the container is into the file "site_settings.inc".

However, the value doesn't change when I modify it, I'm sure it's a coding =
issue concerning my container declaration or definition (Cf. below)

<content:declareField name=3D"cssChoice" title=3D"CSS Choice" type=3D"Share=
dSmallText"
        titleKey=3D"cssChoice"
              value=3D"jahia_multivalue[template3_css.jsp:templates2_css.js=
p:template_css.jsp]>template_css.jsp
              bundleKey=3D"<%=3DresBundleID%>"
       />
    </content:declareContainer>
</content:declareContainerList>

<bean:define id=3D"cssChoice" value=3D"template_css.jsp"/>

<%
cssChoice =3D (String) pageContext.findAttribute("cssChoice");
%>

Thanks a lot for your precious help.

Steeve Le Provost
**********************************************************************
DISCLAIMER
This email and any files transmitted with it, including replies and
forwarded copies (which may contain alterations) subsequently
transmitted from Firmenich, are confidential and solely for the use
of the intended recipient.
The contents do not represent the opinion of Firmenich except
to the extent that it relates to their official business.
**********************************************************************=20
                                                          =20

--_000_A067E5F1F9EA9C4DBF211E41795A5FC99752F95165GVAEXCHVS02eu_
Content-Type: text/html; charset="us-ascii"
Content-Transfer-Encoding: quoted-printable

<html xmlns:v=3D"urn:schemas-microsoft-com:vml" xmlns:o=3D"urn:schemas-micr=
osoft-com:office:office" xmlns:w=3D"urn:schemas-microsoft-com:office:word" =
xmlns:m=3D"http://schemas.microsoft.com/office/2004/12/omml" xmlns=3D"http:=
//www.w3.org/TR/REC-html40">

<head>
<META HTTP-EQUIV=3D"Content-Type" CONTENT=3D"text/html; charset=3Dus-ascii">
<meta name=3DGenerator content=3D"Microsoft Word 12 (filtered medium)">
<style>
<!--
 /* Font Definitions */
 @font-face
	{font-family:Calibri;
	panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
	{font-family:Consolas;
	panose-1:2 11 6 9 2 2 4 3 2 4;}
 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
	{margin:0cm;
	margin-bottom:.0001pt;
	font-size:11.0pt;
	font-family:"Calibri","sans-serif";}
a:link, span.MsoHyperlink
	{mso-style-priority:99;
	color:blue;
	text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
	{mso-style-priority:99;
	color:purple;
	text-decoration:underline;}
p.MsoPlainText, li.MsoPlainText, div.MsoPlainText
	{mso-style-priority:99;
	mso-style-link:"Plain Text Char";
	margin:0cm;
	margin-bottom:.0001pt;
	font-size:10.5pt;
	font-family:Consolas;}
span.PlainTextChar
	{mso-style-name:"Plain Text Char";
	mso-style-priority:99;
	mso-style-link:"Plain Text";
	font-family:Consolas;}
span.EmailStyle19
	{mso-style-type:personal;
	font-family:"Calibri","sans-serif";
	color:windowtext;}
span.EmailStyle20
	{mso-style-type:personal-reply;
	font-family:"Calibri","sans-serif";
	color:#1F497D;}
.MsoChpDefault
	{mso-style-type:export-only;
	font-size:10.0pt;}
@page Section1
	{size:612.0pt 792.0pt;
	margin:70.85pt 70.85pt 70.85pt 70.85pt;}
div.Section1
	{page:Section1;}
-->
</style>
<!--[if gte mso 9]><xml>
 <o:shapedefaults v:ext=3D"edit" spidmax=3D"1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
 <o:shapelayout v:ext=3D"edit">
  <o:idmap v:ext=3D"edit" data=3D"1" />
 </o:shapelayout></xml><![endif]-->
</head>

<body lang=3DEN-US link=3Dblue vlink=3Dpurple>

<div class=3DSection1>

<p class=3DMsoPlainText>Hello everybody,<o:p></o:p></p>

<p class=3DMsoPlainText><o:p>&nbsp;</o:p></p>

<p class=3DMsoNormal>I need your help concerning Jahia 5.<o:p></o:p></p>

<p class=3DMsoNormal><o:p>&nbsp;</o:p></p>

<p class=3DMsoNormal>In fact, I&#8217;m looking to give the possibility for=
 an
administrator to change the stylesheet of a template (the CSS) for the webs=
ite.<o:p></o:p></p>

<p class=3DMsoNormal><o:p>&nbsp;</o:p></p>

<p class=3DMsoNormal>In order to create this, we can have for example 5 dif=
ferent
stylesheets, with other colors or other text size&#8230;When the administra=
tor want
to change the look&#8217;n&#8217;feel of the website, he has only to click =
on it and the
website will be display for the guest like the administrator wants.<o:p></o=
:p></p>

<p class=3DMsoNormal><o:p>&nbsp;</o:p></p>

<p class=3DMsoNormal>I implemented the &#8220;Css Choice&#8221; with a mult=
ivalue list into
the popup of the header logo (Where you can also make a choice for the foot=
er).
All this code with the container is into the file &#8220;site_settings.inc&=
#8221;.<o:p></o:p></p>

<p class=3DMsoNormal><o:p>&nbsp;</o:p></p>

<p class=3DMsoNormal>However, the value doesn&#8217;t change when I modify =
it, I&#8217;m sure
it&#8217;s a coding issue concerning my container declaration or definition=
 (Cf.
below)<o:p></o:p></p>

<p class=3DMsoNormal><o:p>&nbsp;</o:p></p>

<p class=3DMsoNormal><span style=3D'font-size:9.0pt;font-family:"Courier Ne=
w"'>&lt;content:declareField
name=3D&quot;cssChoice&quot; title=3D&quot;CSS Choice&quot;
type=3D&quot;SharedSmallText&quot;<o:p></o:p></span></p>

<p class=3DMsoNormal><span style=3D'font-size:9.0pt;font-family:"Courier Ne=
w"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
titleKey=3D&quot;cssChoice&quot;<o:p></o:p></span></p>

<p class=3DMsoNormal><span style=3D'font-size:9.0pt;font-family:"Courier Ne=
w"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; value=3D&quot;jahia_multivalue[templat=
e3_css.jsp:templates2_css.jsp:template_css.jsp]&gt;template_css.jsp
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <o:p></o:p></span></p>

<p class=3DMsoNormal><span style=3D'font-size:9.0pt;font-family:"Courier Ne=
w"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp=
;&nbsp;
bundleKey=3D&quot;&lt;%=3DresBundleID%&gt;&quot;<o:p></o:p></span></p>

<p class=3DMsoNormal><span style=3D'font-size:9.0pt;font-family:"Courier Ne=
w"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
/&gt;<o:p></o:p></span></p>

<p class=3DMsoNormal><span style=3D'font-size:9.0pt;font-family:"Courier Ne=
w"'>&nbsp;&nbsp;&nbsp;
&lt;/content:declareContainer&gt;<o:p></o:p></span></p>

<p class=3DMsoNormal><span style=3D'font-size:9.0pt;font-family:"Courier Ne=
w"'>&lt;/content:declareContainerList&gt;<o:p></o:p></span></p>

<p class=3DMsoNormal><span style=3D'font-size:9.0pt;font-family:"Courier Ne=
w"'><o:p>&nbsp;</o:p></span></p>

<p class=3DMsoNormal><span style=3D'font-size:9.0pt;font-family:"Courier Ne=
w"'>&lt;bean:define
id=3D&quot;cssChoice&quot; value=3D&quot;<span style=3D'color:red'>template=
_css.jsp</span>&quot;/&gt;<o:p></o:p></span></p>

<p class=3DMsoNormal><span style=3D'font-size:9.0pt;font-family:"Courier Ne=
w"'><o:p>&nbsp;</o:p></span></p>

<p class=3DMsoNormal><span style=3D'font-size:9.0pt;font-family:"Courier Ne=
w"'>&lt;%<o:p></o:p></span></p>

<p class=3DMsoNormal><span style=3D'font-size:9.0pt;font-family:"Courier Ne=
w"'>cssChoice
=3D (String) pageContext.findAttribute(&quot;cssChoice&quot;);<o:p></o:p></=
span></p>

<p class=3DMsoNormal><span style=3D'font-size:9.0pt;font-family:"Courier Ne=
w"'>%&gt;<o:p></o:p></span></p>

<p class=3DMsoNormal><o:p>&nbsp;</o:p></p>

<p class=3DMsoNormal>Thanks a lot for your precious help.<o:p></o:p></p>

<p class=3DMsoNormal><b><o:p>&nbsp;</o:p></b></p>

<p class=3DMsoNormal><b>Steeve Le Provost<o:p></o:p></b></p>

</div>

<pre>**********************************************************************
DISCLAIMER
This email and any files transmitted with it, including replies and
forwarded copies (which may contain alterations) subsequently
transmitted from Firmenich, are confidential and solely for the use
of the intended recipient.
The contents do not represent the opinion of Firmenich except
to the extent that it relates to their official business.
**********************************************************************=20
                                                          =20
</pre></body>

</html>

--_000_A067E5F1F9EA9C4DBF211E41795A5FC99752F95165GVAEXCHVS02eu_--


--===============1287462169==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
template_list mailing list
[email protected]
http://lists.jahia.org/cgi-bin/mailman/listinfo/template_list

--===============1287462169==--