[opencms-dev] How to use multiple contents with jsp templates?

Claus Priisholm cpr at codedroids.com
Wed Feb 4 16:58:01 CET 2004


It is unclear from your mail whether or not you have enabled the 
feature in the first place:

in "/system/workplace/templates/edit_options" (the file is probably on 
page 2 of the list of templates) set

var USE_BODYSELECTOR = true;

This step makes the selector appear in the editor. Next you need to 
provide the appropriate default body (which you select when you create 
a page). Look in "/system/modules/org.opencms.default/default_bodies/" 
for examples - i.e. something like

<?xml version="1.0" encoding="ISO-8859-1"?>
<XMLTEMPLATE>
   <TEMPLATE><![CDATA[ ]]></TEMPLATE>
   <edittemplate><![CDATA[ ]]></edittemplate>
   <template name="foobar"><![CDATA[ ]]></template>
   <edittemplate name="foobar"><![CDATA[ ]]></edittemplate>
</XMLTEMPLATE>

Finally in you jsptemplate reference these two bodies like:

...
<cms:include element=”body” />
...
<cms:include element=”foobar” />
...

On 4/2-2004, at 15.01, Soeren Wollesen wrote:

> I searched the archice for an answer but i found one only for xml
> templates.
> I like to use jsp templates and after reading through the examples of
> the "How-To-Template-Documentation" I'm only able to use a standard
> body.
>
> Like with XML Templates i would like to have a dropdown in the wysiwyg
> Editor where i can choose the bodies of the page i'm working on. So i
> have to define several bodies somewhere, so that the editor knows what
> to display.
>
> I tried the xml way with
> <ELEMENTDEF name="imnhalt1">
> <TEMPLATESELECTOR>inhalt1</TEMPLATESELECTOR>
> </ELEMENTDEF>
>
> and my JSP Template defined in the master Template
>
> and the corresponding default_bodie with
> <template name="inhalt1"/>
> <edittemplate name="inhalt"/>
>
> But that didn't impress the wysiwyg editor. It still shows only the
> empty bodie and no dropdown.
>
> Can somebody help, please?
>
> Soeren Wollesen
>
> _______________________________________________
> This mail is send to you from the opencms-dev mailing list
> To change your list options, or to unsubscribe from the list, please 
> visit
> http://mail.opencms.org/mailman/listinfo/opencms-dev
>
>
--
Claus Priisholm, CodeDroids ApS
+45 48 22 46 46
cpr (you-know-what) interlet.dk - cpr (you-know-what) codedroids.com
http://www.interlet.dk - http://www.codedroids.com




More information about the opencms-dev mailing list