[opencms-dev] about <cms:contentcheck> tag

Hartmann, Waehrisch & Feykes GmbH hartmann at waehrisch-feykes.de
Mon Nov 15 11:55:07 CET 2004


Hi Developers, hi list,

first of all i have to say that the new XML content mechanism ist quite
exactly what OpenCms was missing most. Thanks for it!

In a current project i came to the point where i had to create a new XML
content which is not too complex but needs some conditional checking to
decide which content to show. The contentcheck-tag seemed to be the way to
check the existance of a value, but i found it not very useful. It only
checks if the XML Content contains the defined element(s) but does not check
if it is empty or not.
But in most cases you already know which elements an XML content contains
but you need to know if they are empty or not.
A simple example is to display a link only if it is not empty.

Anyway, i thought there is already a very powerful tag library to perform
conditional checks, so i turned to use the jstl. It is just a little
cumbersome to bring the values to scoped variables. Therefor it would be
nice to have an additional attribute "var" for the contentshow tag to expose
the value of the named element to this variable instead of writing it to the
output. If no element is given, export all elements to a map. Elements that
occur multiple times would become a list.

The implementation should be quite simple and if others will find it useful
i will see if i can do it.

Regards,
Stephan


Stephan Hartmann

Unternehmensberatung Währisch & Feykes GmbH
Gustav-Adolf-Str. 5, 47057 Duisburg
eMail: hartmann at waehrisch-feykes.de
Internet: www.waehrisch-feykes.de
Tel. +49 203 373070, Fax. +49 203 376766

Ausschlusserklärung (Disclaimer):
Über das das Internet versandte e-mails können unter fremden Namen erstellt
oder manipuliert werden. Aus diesem Grund enthalten unsere mit e-mail
verschickten Nachrichten grundsätzlich keine rechtsverbindlichen
Willenserklärungen.





More information about the opencms-dev mailing list