[opencms-dev] template-element property

Chris Tiernan CTiernan at salesforce.com
Wed Sep 6 19:16:04 CEST 2006


Thanks that helps.  So, does this replace the template property,
assuming I have a master template setup, or is it used in conjunction
with the template-elements?


-----Original Message-----
From: opencms-dev-bounces at opencms.org
[mailto:opencms-dev-bounces at opencms.org] On Behalf Of Jonathan Woods
Sent: Tuesday, September 05, 2006 10:45 PM
To: 'The OpenCms mailing list'
Subject: RE: [opencms-dev] template-element property

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-elemen
ts/a
rticle.jsp]]>
							</value>
						</property>
					</properties>
					<copy-resources />
					<param
name="schema">/system/modules/{{runtime.opencms.module.name}}/schemas/ar
ticl
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



_______________________________________________
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