[opencms-dev] Nesting cms tags

Lubomir Kovac kovman at centrum.cz
Thu Feb 22 16:46:30 CET 2007


If you have used the code, that was posted and the error gives you in 
return

"/web//"

then result of

<cms:property name="SolutionDirectoryName"/>

is

/

not blank variable and contend load might not be able to read path 
/web//, but might be able to read /web/ which is not a result

kovi

pmarchwiak napsal(a):
> Using your code, I get the exception "error reading resource from path
> "/web//".
> So the variable is still coming up blank. Any other ideas?
>
>
> Fabian Huschka-2 wrote:
>   
>> 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>
>>>   
>>>       
>> _______________________________________________
>> This mail is sent to you from the opencms-dev mailing list
>> To change your list options, or to unsubscribe from the list, please visit
>> http://lists.opencms.org/mailman/listinfo/opencms-dev
>>
>>
>>     
>
>   




More information about the opencms-dev mailing list