[opencms-dev] JSP and XMLTemplate all together dont work?

Pierre Tissot Pierre.Tissot at cern.ch
Wed Sep 3 18:25:47 CEST 2003


Hi:

I whant to use both tecnologies at the same time...is that possible?

Because I facing with a problem:

I have this page were I define two elements body and news.

<?xml version="1.0" encoding="ISO-8859-1"?>
<PAGE>
    <class>com.opencms.template.CmsXmlTemplate</class>
    
<masterTemplate>/system/modules/com.opencms.modules.homepage.alien/templates/AlienMainPortal</masterTemplate>
    <ELEMENTDEF name="body">
        <CLASS>com.opencms.template.CmsXmlTemplate</CLASS>
        <TEMPLATE>/system/bodies/MainAlienPortal/Default.html</TEMPLATE>
    </ELEMENTDEF>
    <ELEMENTDEF name="news">
        <CLASS>com.opencms.modules.homepage.news.NewsTemplate</CLASS>
        
<TEMPLATE>/system/modules/com.opencms.modules.homepage.alien/elements/NewsSection</TEMPLATE>
        <PARAMETER name="channelid">1</PARAMETER>
    </ELEMENTDEF>
</PAGE>

so in one JSP page to show the body I use:
 
  <cms:include element= "body"/>

and the body is correct. But in my next include:

   <cms:include element= "news"/>

Instead of showing the rigth template, The openCMS is showing the BODY element 
again????????

What is the problem....I tried the same thing only with XMLTEMPLETE the 
ELEMENDEF and the ELEMENT tag and works fine.



 



More information about the opencms-dev mailing list