[opencms-dev] I don't want body (default) to show if I request body2 or body3, etc in the tag ... is there another way?

Steve Mato smato at icc.net
Fri Jul 1 20:24:28 CEST 2005


Hello,

I designed, developed and deployed our website with opencms ( http://www.icc.net/ ).  (Thank you for your commitment.)  This is before I knew how to activate support for multiple body template regions in a /system/bodies/ file, and before I knew the usefulness of the "default body" selection when creating a file.  Therefore the entire site was built with each file containing one un-named body template XML element in the XML body files, thus assigned the "(default)" body name.  

I have since discovered how to have multiple bodies in the file, creating & maintaining them with the WYSIWYG editor.  I "planned" on changing each .jsp template to include this statement in three additional places: 

... HTML ...
<cms:include element="body2" /> ... HTML ...
<cms:include element="body3" /> ... HTML ...
<cms:include element="body4" /> ... HTML ...
... HTML ...

The thing is, for all the pages of the site that were not created with a default body that had all four named body elements pre-defined with empty content, the main body's contents gets returned on the call ... because the 1st body applied to a file in the WYSIWYG editor is the "default" body.  

OK, I surmise it's supposed to do that ... it's doing what it's intended.  However, I want different behavior.  If ...

  <template name="body2"><![CDATA[ ... ]]></template>
  <template name="body3"><![CDATA[ ... ]]></template>
  <template name="body4"><![CDATA[ ... ]]></template>

... is _not_ in the file under /system/bodies/... I want _nothing_ returned; I do _not_ want the body found at this element below returned:
  <TEMPLATE><![CDATA[ ... ]]></TEMPLATE>

- Is there a way to use the TagLib to accomplish this?  I tried different variations naming the file or template to no avail.  

- Is there an API call available that will not return the body named "(default)" if I ask for another one by name?

- Is there a start-up configuration option I don't know about?

- Do I need to modify the CmsJspTagInclude class to change this behavior?  I'm ok doing so, as I changed the way I needed Links to behave.  However looking at the class, I couldn't quite figure out where the default body gets included in the Java code.  It may not even be in the class.  

If you can point me to the correct direction, I can take it from there.  Thank you for your time and assistance, if rendered.

Best Regards,
Steve Mato


::::
 :: Steve Mato
 :: Senior Systems Architect
 :: Internet Commerce Corporation
 :: 45 Research Way, East Setauket, NY  11733
:::: 
 :: mailto:smato at icc.net  
 :: http://www.icc.net  
 :: p: 631-590-1010 x5115
 :: f: 631-246-5677 
::::



More information about the opencms-dev mailing list