[opencms-dev] How to define template elements before use them?

Salvador Santander dominion.salvador.ext at juntadeandalucia.es
Mon Nov 24 09:40:02 CET 2003


Heelo, list, I want to define template template elements in OpenCMS 5 as
like I did it in OpenCMS 4.6.
In OpenCMS 4.6 I had:

<?xml version="1.0"?>
<XMLTEMPLATE>
    <ELEMENTDEF name="contenttemplate">
        <CLASS>com.opencms.template.CmsXmlTemplate</CLASS>
        <TEMPLATE>/content/contenttemplates/ctMain</TEMPLATE>
    </ELEMENTDEF>
    <ELEMENTDEF name="frametemplate">
        <CLASS>com.opencms.template.CmsXmlTemplate</CLASS>
        <TEMPLATE>/content/frametemplates/ftMain</TEMPLATE>
    </ELEMENTDEF>

    <ELEMENTDEF name="navigation">
        <CLASS>com.opencms.modules.homepage.news.NewsTemplate</CLASS>
        <TEMPLATE>/content/elements/eNavigation</TEMPLATE>
    </ELEMENTDEF>


    <ELEMENTDEF name="head">
        <CLASS>com.opencms.template.CmsXmlTemplate</CLASS>
        <TEMPLATE>/content/elements/eHead</TEMPLATE>
    </ELEMENTDEF>


<TEMPLATE>
<ELEMENT name="frametemplate"/>
</TEMPLATE>
</XMLTEMPLATE>

Doing this, I can easily reuse the main structure ( ftMain ) to do more
templates only changing the elements, and without to have to rewrite the
structure template in each template. I try to do it with <cms:template
element=..> the template is used at the moment and I don't want this.
How can I do this with jsptemplates?
Thanks.




More information about the opencms-dev mailing list