[opencms-dev] Check if a body is used in a page

Ronald Lips ronald.lips at atobemobile.com
Tue Feb 22 10:19:36 CET 2005


Hi

Using OpenCms 6.0 alpha I have created a default body:

<?xml version="1.0" encoding="UTF-8"?>
<pages xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="http://www.opencms.org/dtd/6.0/xmlpage.xs
d">
  <page language="en">
    <element name="acontent-item">
      <links/>
      <content/>
    </element>
    <element name="pre-menu-text">
      <links/>
      <content/>
    </element>
    <element name="post-menu-text">
      <links/>
      <content/>
    </element>
    <element name="back-link1">
      <links/>
      <content/>
    </element>
    <element name="back-link2">
      <links/>
      <content/>
    </element>
    <element name="footer">
      <links/>
      <content/>
    </element>
  </page>
</pages>

In my template I then have the following:

<cms:template element="back-link2">
	<p><cms:include element="back-link2"></p>
</cms:template>

What I want to achieve is that the <p>-tags are only in my page when the
back-link2 element is actually used. However, even when I do not fill
the back-link2 element in the page based on this template, I always get
the <p>-tags. My assumption is that the <cms:template
element="back-link2"> is some kind of test to see if the element is
actually used in the page based on the template. However, this does not
seem to be the case. Is there some way of checking if an element is
actually used in the page?

Hope you can help, 

Regards
Ronald

AtoBe Mobile Solutions
Ronald Lips

tel:	+31 (0)23 750 21 19
fax:	+31 (0)23 750 21 11
mob:	+31 (0)651 18 35 70
mail:	ronald.lips at atobemobile.com
web:	www.atobemobile.com


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://webmail.opencms.org/pipermail/opencms-dev/attachments/20050222/ffab8d9e/attachment.htm>


More information about the opencms-dev mailing list