[opencms-dev] test value of a field in XML content template

Stefan Uldum Grinsted sug at interactive.as
Wed Jul 27 11:19:19 CEST 2005


Hi Tim (And Ulrich if still an issue)

You can use the JSTL core to test the contents of xmlcontent elements like 
this:

        <c:set var="toc"><cms:contentshow 
element="TableOfContents"/></c:set>
        <c:if test="${toc == 'true'}">
                <cms:include file="tableofcontents.jsp"/>
        </c:if>

just remember to include the taglib like this:

<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %>

Hope this helps

Best regards
Stefan Uldum Grinsted
---------------------------------
Par No 1 Interactive a|s
sug at interactive.as




"Tim Howland" <thowland at organic.com> 
Sent by: opencms-dev-bounces at opencms.org
26-07-2005 18:09
Please respond to
The OpenCms mailing list <opencms-dev at opencms.org>


To
<opencms-dev at opencms.org>
cc

Subject
[opencms-dev] test value of a field in XML content template






Hey all- 

I'm trying to test against a boolean field in an XML content template. I 
ran across Ulrich's post: 

Hi all, 

I need to check the value of a xml element of type "OpenCmsBoolean" in a 
xml-content while processing: 

    ... 
    <TableOfContents>true</TableOfContents> 
    ... 

The opencms taglib allows to check for the element itself using 
<cms:contentcheck ifexists="TableOfContents">, but not for the value of it 

(true|false). 

Any ideas? 

Thanks and regards 
Ulrich 


I'm having the same issue. Does anyone have this worked out yet? I 
couldn't find anything in the list... 

Thanks! 

Tim

_______________________________________________
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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://webmail.opencms.org/pipermail/opencms-dev/attachments/20050727/af3fcafd/attachment.htm>


More information about the opencms-dev mailing list