[opencms-dev] Contenttemplate doesn't work - please help!

Oliver Faulhaber ofh3 at hotmail.com
Wed Mar 12 12:26:49 CET 2003


Hello,

I'm currently working on a project with OpenCms 5 RC2.

I've set up the templates like described in the documentation on page 25ff. 
Everything works fine except the contenttemplate element. It doesn't work 
when defined in the mastertemplate. Only if defined directly in the 
frametemplate, everything works correctly.
But defining the contenttemplate (the <ELEMENTDEF> tag) in the frametemplate 
is against the idea and has some serious disadvantages. Thus I want to 
define it in the mastertemplate as described in the manual.

I've studied the documentation example now several times, but can't find any 
difference. Has anybody an idea, what I'am doing wrong?

Thanks,
Oliver

---

Example code:

MASTERTEMPLATE:
(/system/modules/org.opencms.default/templates/standard)

<?xml version="1.0" encoding="ISO-8859-1"?>

<XMLTEMPLATE>

<ELEMENTDEF name="contenttemplate">
  <CLASS>com.opencms.template.CmsXmlTemplate</CLASS>
  
<TEMPLATE>/system/modules/org.opencms.default/contenttemplates/content</TEMPLATE>
</ELEMENTDEF>
<ELEMENTDEF name="frametemplate">
  <CLASS>com.opencms.template.CmsXmlTemplate</CLASS>
  
<TEMPLATE>/system/modules/org.opencms.default/frametemplates/frame</TEMPLATE>
</ELEMENTDEF>

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



FRAMETEMPLATE:
(/system/modules/org.opencms.default/frametemplates/frame)

<?xml version="1.0" encoding="ISO-8859-1"?>

<XMLTEMPLATE>
<TEMPLATE><![CDATA[

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html><head></head>

<body>
]]><ELEMENT name="contenttemplate"/><![CDATA[
</body>
</html>]]>

</TEMPLATE>
</XMLTEMPLATE>



CONTENTTEMPLATE:
(/system/modules/org.opencms.default/contenttemplates/content)

<?xml version="1.0" encoding="ISO-8859-1"?>
<XMLTEMPLATE>
<TEMPLATE>
<![CDATA[<BR><BR>Content:<BR>]]>
<ELEMENT name="body"/>
</TEMPLATE>
</XMLTEMPLATE>





_________________________________________________________________
MSN Groups & Chat - Freunde finden - leicht gemacht  
http://groups.msn.com/people/




More information about the opencms-dev mailing list