[opencms-dev] Use of cms:includ>

William T. Mann wtmann at linuxthinktank.org
Tue May 22 20:42:48 CEST 2007


Hi all,

I've begun studying OpenCMS and am now working adding structured 
content. Up until now, everything has worked fine but now I've hit a 
problem.

I have a scheme that contains a link to another scheme. And that works. 
The problem is in the JSP that shows the data. The JSP has to show the 
data of the first XSD and a part of the second XSD. I'd like to use the 
cms:include tag to do this, but I need to do it dynamically. That is, if 
  I do the following it works:

<cms:contentcheck ifexists element="Sector">
     <p>Sector: <cms:include file="/test.html" element="Description" /></p>
</cms:contentcheck>

However, if I try to do it dynamically it won't work:

<cms:contentcheck ifexists element="Sector">
     <p>Sector: <cms:include file="<cms:contentshow element="Sector"/>" 
element="Description" /></p>
</cms:contentcheck>

This gives an error. Is it possible? What am I missing?

Thanks for any insight into this.

-- 
William Mann



More information about the opencms-dev mailing list