<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<META NAME="Generator" CONTENT="MS Exchange Server version 5.5.2658.24">
<TITLE>bvr : Site Specific content ?? A replacement for the Bitch !!</TITLE>
</HEAD>
<BODY>
<P><FONT SIZE=2><%--</FONT>
</P>
<P><FONT SIZE=2>OpenCms is easy for channel specific Content </FONT>
<BR><FONT SIZE=2>but a Bitch for Site Specific Content</FONT>
</P>
<P><FONT SIZE=2>I have a different solution to this problem </FONT>
<BR><FONT SIZE=2>THE GOOD OLD HASHTABLE</FONT>
</P>
<P><FONT SIZE=2>I have a class in a second JSP that I include in my template</FONT>
<BR><FONT SIZE=2>This class has two methods</FONT>
</P>
<P><FONT SIZE=2>In my Site Specific Content I can handle many foreign languages</FONT>
</P>
<P><FONT SIZE=2>and I just add as many new tokens as I want in my setupData() method</FONT>
</P>
<P><FONT SIZE=2>and I get the tokens back using my getTokens(TokenKey ) method</FONT>
<BR><FONT SIZE=2>By using token calls in my JSP instead of text in my JSP template html tags</FONT>
<BR><FONT SIZE=2>I have made every element other than the body text sit out side my template in my Java Class</FONT>
</P>
<P><FONT SIZE=2>Has any one else done something similar ?</FONT>
</P>
<P><FONT SIZE=2>Now what would be nice if you could have one JSP and make different instances on each site or sub site</FONT>
</P>
<P><FONT SIZE=2>also the tokens can be loaded from a properties file with an additional method where you pass the filename / path</FONT>
</P>
<BR>
<P><FONT SIZE=2>your comments ..........please</FONT>
<BR>
<BR><FONT SIZE=2>regards</FONT>
<BR><FONT SIZE=2>Nico</FONT>
<BR>
<BR><FONT SIZE=2>--%> </FONT>
</P>
<P><FONT SIZE=2><%! // you must use this tag if you want your jsp to hold a Java Class</FONT>
</P>
<P><FONT SIZE=2>public class TemplateData{</FONT>
<BR><FONT SIZE=2> Hashtable tokens= new Hashtable();</FONT>
<BR><FONT SIZE=2> </FONT>
<BR><FONT SIZE=2> public String getTokens(String key){ // THIS IS USED TO RETRIEVE ANY TOKEN CONTENT</FONT>
<BR> <FONT SIZE=2>String result3=(String) tokens.get(key);</FONT>
</P>
<P><FONT SIZE=2> if (result3!=null && result3.length()>0){</FONT>
<BR><FONT SIZE=2> return result3;</FONT>
<BR><FONT SIZE=2> }</FONT>
<BR><FONT SIZE=2> result3="";</FONT>
<BR><FONT SIZE=2> return result3; </FONT>
<BR><FONT SIZE=2> }</FONT>
</P>
<BR>
<P><FONT SIZE=2> public void setupData(){ I first call this method of the class to set all my tokens</FONT>
</P>
<P><FONT SIZE=2> // TOKENS ARE USED FOR LABELS IMAGES URLS AND HTML TAGS</FONT>
<BR><FONT SIZE=2> tokens.put("organizationName","Federation of Afrikaans Communities and Associations of South Africa");</FONT>
<BR><FONT SIZE=2> tokens.put("organizationForeignName","hier kom die boere");</FONT>
<BR><FONT SIZE=2> tokens.put("mainAdverttext","The Webmasters Community Resources");</FONT>
<BR><FONT SIZE=2> tokens.put("mainAdvertForeigntext","hier kom die boere taal");</FONT>
<BR><FONT SIZE=2> tokens.put("mainAdvertUrl","<A HREF="http://localhost:9090/opencms/opencms/Federation/useful_information.html" TARGET="_blank">http://localhost:9090/opencms/opencms/Federation/useful_information.html</A>");</FONT>
<BR><FONT SIZE=2> tokens.put("webDesignerText","This web site was designed by the web master (Nico Michael)");</FONT>
<BR><FONT SIZE=2> tokens.put("webDesignerURL","<A HREF="http://www.Afrikaans" TARGET="_blank">http://www.Afrikaans</A> .org.za/cmp/index.html#nick");</FONT>
<BR><FONT SIZE=2> tokens.put("hostingCoText","This Website is hosted by CMP");</FONT>
<BR><FONT SIZE=2> tokens.put("hostingCoURL","<A HREF="http://www.orthodoxjohannesburg.org.za/Cmp/index.html" TARGET="_blank">http://www.orthodoxjohannesburg.org.za/Cmp/index.html</A>");</FONT>
<BR><FONT SIZE=2> tokens.put("emailUser","webmaster");</FONT>
<BR><FONT SIZE=2> tokens.put("emailSite","sa.org.za");</FONT>
<BR><FONT SIZE=2> tokens.put("bannerTags","AfrikaansFederation.jpg");</FONT>
<BR><FONT SIZE=2> tokens.put("menuTableWidth","width=" +QU + "153" +QU);</FONT>
<BR><FONT SIZE=2> tokens.put("styleSheetnName","../files/style.css");</FONT>
<BR><FONT SIZE=2> }</FONT>
<BR><FONT SIZE=2>}</FONT>
<BR><FONT SIZE=2> TemplateData templateData=new TemplateData(); //instanciate object</FONT>
<BR><FONT SIZE=2>%></FONT>
</P>
<BR>
<P><FONT SIZE=2>-----Original Message-----</FONT>
<BR><FONT SIZE=2>From: opencms-dev-bounces@opencms.org</FONT>
<BR><FONT SIZE=2>[<A HREF="mailto:opencms-dev-bounces@opencms.org">mailto:opencms-dev-bounces@opencms.org</A>]On Behalf Of Jorge González</FONT>
<BR><FONT SIZE=2>Sent: Tuesday, October 04, 2005 11:37</FONT>
<BR><FONT SIZE=2>To: 'The OpenCms mailing list'</FONT>
<BR><FONT SIZE=2>Subject: RE: [opencms] Re: [opencms-dev] Permissions to change JSPs</FONT>
</P>
<BR>
<P><FONT SIZE=2>You can put all the jsp config stuff into a xml file (or properties file)</FONT>
<BR><FONT SIZE=2>and let the user change it.</FONT>
</P>
<BR>
<BR>
<P><FONT SIZE=2>_______________________________________________</FONT>
<BR><FONT SIZE=2>This mail is send to you from the opencms-dev mailing list</FONT>
<BR><FONT SIZE=2>To change your list options, or to unsubscribe from the list, please visit</FONT>
<BR><FONT SIZE=2><A HREF="http://mail.opencms.org/mailman/listinfo/opencms-dev" TARGET="_blank">http://mail.opencms.org/mailman/listinfo/opencms-dev</A></FONT>
</P>
<DIV>__________________________________________________________________________________________________________________________________</DIV>
<DIV><SPAN class=236492506-24112004><FONT size=2><SPAN lang=EN-ZA
style="FONT-SIZE: 9pt; LAYOUT-GRID-MODE: line; FONT-FAMILY: Arial; mso-bidi-font-size: 12.0pt; mso-fareast-font-family: 'Times New Roman'; mso-ansi-language: EN-ZA; mso-fareast-language: EN-US; mso-bidi-language: AR-SA"><STRONG><SPAN
lang=EN-US
style="FONT-SIZE: 9pt; FONT-FAMILY: Arial; mso-bidi-font-size: 12.0pt">Standard
Bank Disclaimer and Confidentiality Note<O:P></O:P></SPAN></STRONG>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN
style="FONT-SIZE: 9pt; mso-bidi-font-size: 12.0pt"><O:P></O:P></SPAN></P>
<P class=MsoBodyText
style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: normal; TEXT-ALIGN: justify"><SPAN
lang=EN-US
style="FONT-SIZE: 9pt; FONT-FAMILY: Arial; mso-bidi-font-size: 12.0pt">This
e-mail, its attachments and any rights attaching hereto are, unless the context
clearly indicates otherwise, the property of Standard Bank Group Limited
</SPAN><SPAN lang=EN-US
style="FONT-SIZE: 9pt; FONT-FAMILY: Arial; mso-bidi-font-size: 12.0pt">and/or
its subsidiaries ("the Group"). It is confidential, private and intended for the
addressee only.</SPAN></P>
<P class=MsoBodyText
style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: normal; TEXT-ALIGN: justify"><SPAN
lang=EN-US
style="FONT-SIZE: 9pt; FONT-FAMILY: Arial; mso-bidi-font-size: 12.0pt"></SPAN><SPAN
lang=EN-US
style="FONT-SIZE: 9pt; FONT-FAMILY: Arial; mso-bidi-font-size: 12.0pt">Should
you not be the addressee and receive this e-mail by </SPAN><SPAN lang=EN-US
style="FONT-SIZE: 9pt; FONT-FAMILY: Arial; mso-bidi-font-size: 12.0pt">mistake,
kindly notify the sender, and delete this e-mail, immediately and do not
disclose or use same in any manner whatsoever. </SPAN><SPAN lang=EN-US
style="FONT-SIZE: 9pt; FONT-FAMILY: Arial; mso-bidi-font-size: 12.0pt">Views and
opinions expressed </SPAN><SPAN lang=EN-US
style="FONT-SIZE: 9pt; FONT-FAMILY: Arial; mso-bidi-font-size: 12.0pt">in this
e-mail are those of the sender unless clearly stated as those of the Group. The
Group </SPAN><SPAN lang=EN-US
style="FONT-SIZE: 9pt; FONT-FAMILY: Arial; mso-bidi-font-size: 12.0pt; mso-fareast-font-family: 'Arial Unicode MS'">accepts
no liability whatsoever for any loss or damages </SPAN><SPAN lang=EN-US
style="FONT-SIZE: 9pt; FONT-FAMILY: Arial; mso-bidi-font-size: 12.0pt; mso-fareast-font-family: 'Arial Unicode MS'">whatsoever
and howsoever incurred, or suffered, resulting, or arising, from the use of this
email or its attachments.</SPAN></P>
<P class=MsoBodyText
style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: normal; TEXT-ALIGN: justify"><SPAN
lang=EN-US
style="FONT-SIZE: 9pt; FONT-FAMILY: Arial; mso-bidi-font-size: 12.0pt; mso-fareast-font-family: 'Arial Unicode MS'"></SPAN><SPAN
lang=EN-US
style="FONT-SIZE: 9pt; FONT-FAMILY: Arial; mso-bidi-font-size: 12.0pt; mso-fareast-font-family: 'Arial Unicode MS'">The
Group does not warrant the integrity of this </SPAN><SPAN lang=EN-US
style="FONT-SIZE: 9pt; FONT-FAMILY: Arial; mso-bidi-font-size: 12.0pt; mso-fareast-font-family: 'Arial Unicode MS'">e-mail
nor that it is free of errors, viruses, interception or interference.
</SPAN><SPAN
style="FONT-SIZE: 9pt; FONT-FAMILY: Arial; mso-bidi-font-size: 12.0pt; mso-ansi-language: EN-GB">Licensed
divisions of the Standard Bank Group are authorised financial services providers
in terms of the Financial Advisory and Intermediary Services Act, No 37 of 2002
(FAIS).</SPAN><SPAN lang=EN-US
style="FONT-SIZE: 9pt; FONT-FAMILY: Arial; mso-bidi-font-size: 12.0pt"><O:P></O:P></SPAN></P>
<P class=MsoBodyText
style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: normal; TEXT-ALIGN: justify"><SPAN
lang=EN-US
style="FONT-SIZE: 9pt; FONT-FAMILY: Arial; mso-bidi-font-size: 12.0pt"><O:P></O:P></SPAN></P>
<P class=MsoBodyText style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: normal"><SPAN
lang=EN-US
style="FONT-SIZE: 9pt; FONT-FAMILY: Arial; mso-bidi-font-size: 12.0pt; mso-fareast-font-family: 'Arial Unicode MS'">For
information about the Standard Bank Group Limited visit our website <A
href="http://www.standardbank.co.za"><FONT
color=#0000ff>http://www.standardbank.co.za</FONT></A></SPAN></P></SPAN></FONT></SPAN><FONT
color=#0000ff><FONT
color=#000000>__________________________________________________________________________________________________________________________________<BR></FONT></DIV></FONT>
</BODY>
</HTML>