[opencms-dev] Check if element exists

Yves Glodt yg at mind.lu
Tue Mar 29 14:58:01 CEST 2011


Hello,

I try to check if an element exists in a "page with free text", and if yes,
include it.

The check I do like this (in a c:if), but these 3 calls return "false, true,
false" (in order of appearance)
${cms:vfs(pageContext).xml[cms:vfs(pageContext).context.uri].hasValue['rcontent']}
${cms:vfs(pageContext).xml[cms:vfs(pageContext).context.uri].value['rcontent'].isEmpty}
${cms:vfs(pageContext).xml[cms:vfs(pageContext).context.uri].value['rcontent'].exists}

What is wrong about this?

Best regards,
Yves
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://webmail.opencms.org/pipermail/opencms-dev/attachments/20110329/0731df96/attachment.htm>


More information about the opencms-dev mailing list