[opencms-dev] template-element property
Jonathan Woods
jonathan.woods at scintillance.com
Wed Sep 6 07:45:02 CEST 2006
If you set the template-elements property on an XML resource to the path of
a JSP (usually one held within a module), than page views of the URL
corresponding to the XML resource causes the JSP to be executed. Typically,
this approach is used to render XML content using a JSP view.
When XML content types are defined in a module, it's common to have the
template-elements property set automatically on new instances of the content
type. Here's an example taken from my opencms-modules.xml:
<resourcetypes>
<type
class="org.opencms.file.types.CmsResourceTypeXmlContent" name="article"
id="80">
<properties>
<property>
<!-- Determines
behaviour of editor in outputting contents -->
<name>content-conversion</name>
<value
type="shared">
<![CDATA[cleanup;xhtml]]>
</value>
</property>
<property>
<!-- This
property is set to define the JSP used to render the resource. -->
<name>template-elements</name>
<value
type="shared">
<![CDATA[/system/modules/{{runtime.opencms.module.name}}/template-elements/a
rticle.jsp]]>
</value>
</property>
</properties>
<copy-resources />
<param
name="schema">/system/modules/{{runtime.opencms.module.name}}/schemas/articl
e.xsd</param>
</type>
<!- ........ ->
</resourcetypes>
Jon
-----Original Message-----
From: opencms-dev-bounces at opencms.org
[mailto:opencms-dev-bounces at opencms.org] On Behalf Of Chris Tiernan
Sent: 06 September 2006 02:25
To: opencms-dev at opencms.org
Subject: [opencms-dev] template-element property
I'm a little confused by the template-element property. Can anyone
provide a quick explanation of this property, how I can benefit from using
it, and point me to a good example? Thanks in advanced.
Best,
Chris
_______________________________________________
This mail is sent to you from the opencms-dev mailing list To change your
list options, or to unsubscribe from the list, please visit
http://lists.opencms.org/mailman/listinfo/opencms-dev
More information about the opencms-dev
mailing list