[opencms-dev] How to get that when you use the <cms:template> directive doesn't print anything
Salvador Santander
dominion.salvador.ext at juntadeandalucia.es
Mon Dec 1 11:21:01 CET 2003
Hello. My question is: How to get that when you use the <cms:template>
directive doesn't print anything, and only print the template when I use it
with <cms:include element=..> directive. I want to define all the elements
in a template and use them after in the subtemplates, but when in the main
template I use <cms:template name= > opencms print the content at this
place.
With more details: I want to develope an estructure of templates like this:
--- simplePageTemplate ---
<cms:template name="frametemplate">
<cms:include file="./frameTemplateWithoutFrames.jsp">
</cms:template>
<cms:template name="contenttemplate">
<cms:include file="./simpleContentTemplate.jsp">
</cms:template>
<cms:include element="frametemplate"/>
---------------------------------
--- frameTemplateWithoutFrames.jsp -----------
....
<cms:include element="contentTemplate"/>
.....
----------------------------------------------
So when I want to create I template for, for example, a simple page with a
title, I've only to write other contenttemplate and indicate that the
element contenttemplate is now another jsp template, without to have to
rewrite all the frame template
---- simplePageWithTitleTemplate.jsp
<cms:template name="frametemplate">
<cms:include file="./frameTemplateWithoutFrames.jsp">
</cms:template>
<cms:template name="contenttemplate">
<cms:include file="./simpleContentTemplateWithTitle.jsp">
</cms:template>
<cms:include element="frametemplate"/>
---------------------------------------------
But this doesn't work well, because the <cms:template > directive print the
template in the place is defined and then appears the contenttemplate
element two times.
Anybody knows how to get what I want?
Thanks.
More information about the opencms-dev
mailing list