[opencms-dev] Nesting cms tags

Fabian Huschka fabian.huschka at componio.net
Mon Feb 19 19:41:53 CET 2007


Hello,

I did run into the same propblem as you and fixed it by adding the path 
to the local page context through the JSTL.

--snip---

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

<c:set var="path">/web/<cms:property name="SolutionDirectoryName" /></c:set>

<cms:contentload collector="...." param="${pageContext.path}|event">

...

That shall do the trick...

/Fabian
> I am constantly having trouble nesting tags. From looking at past posts, it
> seems that it is possible to do it and supposedly there was a bug that is
> now fixed. Can anyone tell me if this kind of thing is just not possible to
> do in OpenCms? Is there still a bug?
>
> This code gives me an "equal symbol expected error":
>
> <cms:contentload collector="allInSubTree" param="/web/<cms:property name="SolutionDirectoryName" />/|event">
>
> I also tried something like this:
>
> <c:set var="directory">
> /web/<cms:property name="SolutionDirectoryName" />/|news
> </c:set> 
> <cms:contentload collector="allInSubTree" param="${directory}">
>
> but the directory variable comes up blank.
>
>
> Something like this also doesn't work:
>
> <cms:contentload collector="allInSubTree" param="/web/|solution">
> <li class="current-cat"> "<cms:link ${opencms.filename}</cms:link>"
> title="Some property of this solution"><cms:contentshow element="Title" /> 
> 	<ul class='children'>	
> 		<cms:contentload collector="allInSubTree" param="/web/<cms:contentshow
> element="DirectoryName" />/|subsolution">
> 			<li> "<cms:link ${opencms.filename}</cms:link>" title = "Some property of
> this subsolution"><cms:contentshow element="Title" /> 
> 			</li>
> 		</cms:contentload>
> 	</ul>
> </cms:contentload>
>   



More information about the opencms-dev mailing list