<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=us-ascii">
<META content="MSHTML 6.00.6000.16981" name=GENERATOR></HEAD>
<BODY>
<DIV dir=ltr align=left><SPAN class=888284413-29032010><FONT face=Arial
color=#0000ff size=2>Tim,</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=888284413-29032010><FONT face=Arial
color=#0000ff size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=888284413-29032010><FONT face=Arial
color=#0000ff size=2>xmlpage is not a type of structured content, it is an
individual resource type in OpenCms, separate from xmlcontent. I'm quite certain
of this. As for the rest I'm about to explain, I'm
not absolutely sure, but I'll at least explain the idea I'm
working from, with some code examples included. (I'm using xmlpage as an example
only because it's the only resource type I know of wherer OpenCms makes use
of the "template" property.)</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=888284413-29032010><FONT face=Arial
color=#0000ff size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=888284413-29032010><FONT face=Arial
color=#0000ff size=2>xmlpage files do not _need_ to have their
"template-elements" property set, only their "template" property
is required. OpenCms will use the JSP defined as
"template" for rendering the page.</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=888284413-29032010><FONT face=Arial
color=#0000ff size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=888284413-29032010><FONT face=Arial
color=#0000ff size=2>xmlcontent files do not _need_ to have their
"template" property set, only their "template-elements"
property is required. OpenCms will use the JSP defined as
"template-elements" for rendering the page.</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=888284413-29032010><FONT face=Arial
color=#0000ff size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=888284413-29032010><FONT face=Arial
color=#0000ff size=2>However, I think it's a good idea to utilize the
"template" property for xmlcontent as well, because this allows for the usage of
one single "master template", reducing duplicate code. But you have to make
use of the "template" property yourself, OpenCms will not do this for
you. So, in the xmlcontent's "template-elements" JSP, you'll have
to manually read the "template" property and include the neccessary
elements.</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=888284413-29032010><FONT face=Arial
color=#0000ff size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=888284413-29032010><FONT face=Arial
color=#0000ff size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=888284413-29032010><FONT face=Arial
color=#0000ff size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=888284413-29032010><FONT face=Arial
color=#0000ff size=2>Typically, my master template ("template"
property) looks kinda like this:</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=888284413-29032010><FONT face=Arial
color=#0000ff size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=888284413-29032010><FONT face=Arial
color=#0000ff size=2><cms:template element="header"></FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=888284413-29032010><FONT face=Arial
color=#0000ff size=2> <!DOCTYPE ....></FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=888284413-29032010><FONT face=Arial
color=#0000ff size=2> <html ...></FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=888284413-29032010><FONT face=Arial
color=#0000ff size=2> <head>....</head> <!--
stylesheets, javascripts and so on, common for entire site
--></FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=888284413-29032010><FONT face=Arial
color=#0000ff size=2> <body></FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=888284413-29032010><FONT face=Arial
color=#0000ff size=2> <div id="header">....<cms:include
file="../elements/searchbox.jsp"/>...</div> <!-- header with
searchbox, common for entire site --></FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=888284413-29032010><FONT face=Arial
color=#0000ff size=2> <cms:include file="../elements/navi.jsp"
/> <!-- global navigation, common for entire
site --></FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=888284413-29032010><FONT face=Arial
color=#0000ff size=2> <h1><cms:property
name="Title"/></h1></FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=888284413-29032010><FONT face=Arial
color=#0000ff size=2></cms:template></FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=888284413-29032010><FONT face=Arial
color=#0000ff size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=888284413-29032010><FONT face=Arial
color=#0000ff size=2><cms:template
element="contentbody"></FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=888284413-29032010><FONT face=Arial
color=#0000ff size=2> <cms:include element="body" /><!--
this is where content from "body" elements of xmlpage files will be rendered
--><BR></cms:template></FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=888284413-29032010><FONT face=Arial
color=#0000ff size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=888284413-29032010><FONT face=Arial
color=#0000ff size=2><cms:template element="footer"></FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=888284413-29032010><FONT face=Arial
color=#0000ff size=2> <div class="footer">...<cms:include
file="../resources/footertext.txt" />...</div>
<!-- footer content, common for entire
site --></FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=888284413-29032010><FONT face=Arial
color=#0000ff size=2> </body></FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=888284413-29032010><FONT face=Arial
color=#0000ff size=2> </html></FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=888284413-29032010><SPAN
class=888284413-29032010><FONT face=Arial color=#0000ff
size=2></cms:template></FONT></SPAN></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=888284413-29032010><SPAN
class=888284413-29032010><FONT face=Arial color=#0000ff
size=2></FONT></SPAN></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=888284413-29032010><SPAN
class=888284413-29032010><FONT face=Arial color=#0000ff
size=2></FONT></SPAN></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=888284413-29032010><SPAN
class=888284413-29032010><FONT face=Arial color=#0000ff
size=2></FONT></SPAN></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=888284413-29032010><SPAN
class=888284413-29032010><FONT face=Arial color=#0000ff size=2>and my structured
content templates ("template-elements" property) looks kinda like
this:</FONT></SPAN></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=888284413-29032010><SPAN
class=888284413-29032010><FONT face=Arial color=#0000ff
size=2></FONT></SPAN></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=888284413-29032010><SPAN
class=888284413-29032010><FONT face=Arial color=#0000ff size=2><cms:include
property="template" element="header" /> <!-- will include the
common top part of the page --></FONT></SPAN></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=888284413-29032010><SPAN
class=888284413-29032010><FONT face=Arial color=#0000ff size=2>
<%</FONT></SPAN></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=888284413-29032010><SPAN
class=888284413-29032010><FONT face=Arial color=#0000ff size=2> //
Handle the specific structured content:</FONT></SPAN></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=888284413-29032010><SPAN
class=888284413-29032010><FONT face=Arial color=#0000ff size=2>
cms.contentload(...);</FONT></SPAN></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=888284413-29032010><SPAN
class=888284413-29032010><FONT face=Arial color=#0000ff size=2>
...and...</FONT></SPAN></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=888284413-29032010><SPAN
class=888284413-29032010><FONT face=Arial color=#0000ff size=2>
cms.contentshow(...);</FONT></SPAN></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=888284413-29032010><SPAN
class=888284413-29032010><FONT face=Arial color=#0000ff size=2>
...and so on....</FONT></SPAN></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=888284413-29032010><SPAN
class=888284413-29032010><FONT face=Arial color=#0000ff size=2> //
Done handling the specific structured content.</FONT></SPAN></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=888284413-29032010><SPAN
class=888284413-29032010><FONT face=Arial color=#0000ff size=2>
%></FONT></SPAN></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=888284413-29032010><SPAN
class=888284413-29032010><FONT face=Arial color=#0000ff size=2><cms:include
property="template" element="footer" /> <!-- will include the common
bottom part of the page --></FONT></SPAN></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=888284413-29032010><SPAN
class=888284413-29032010><FONT face=Arial color=#0000ff
size=2></FONT></SPAN></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=888284413-29032010><SPAN
class=888284413-29032010><FONT face=Arial color=#0000ff
size=2></FONT></SPAN></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=888284413-29032010><SPAN
class=888284413-29032010><FONT face=Arial color=#0000ff
size=2></FONT></SPAN></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=888284413-29032010><SPAN
class=888284413-29032010><FONT face=Arial color=#0000ff
size=2></FONT></SPAN></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=888284413-29032010><SPAN
class=888284413-29032010><FONT face=Arial color=#0000ff size=2>I typically set
the "master template" on the site root folder, so it's shared across the
entire site, for all resource types. And then I set the "template-elements" on
specific resource types or folders. For structured content, I often set the
"template-elements" property automatically by defining a default property
value in opencms-modules.xml.</FONT></SPAN></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=888284413-29032010><SPAN
class=888284413-29032010><FONT face=Arial color=#0000ff
size=2></FONT></SPAN></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=888284413-29032010><SPAN
class=888284413-29032010><FONT face=Arial color=#0000ff size=2>Hope I was able
to shed some light on this, confused as I am myself...
:-)</FONT></SPAN></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=888284413-29032010><SPAN
class=888284413-29032010><FONT face=Arial color=#0000ff
size=2></FONT></SPAN></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=888284413-29032010><SPAN
class=888284413-29032010><FONT face=Arial color=#0000ff size=2>Best
regards,</FONT></SPAN></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=888284413-29032010><SPAN
class=888284413-29032010><FONT face=Arial color=#0000ff
size=2>Paul</FONT></SPAN></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=888284413-29032010><FONT face=Arial
color=#0000ff size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=888284413-29032010><FONT face=Arial
color=#0000ff size=2></FONT></SPAN> </DIV><BR>
<BLOCKQUOTE dir=ltr
style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #0000ff 2px solid; MARGIN-RIGHT: 0px">
<DIV class=OutlookMessageHeader lang=en-us dir=ltr align=left>
<HR tabIndex=-1>
<FONT face=Tahoma size=2><B>From:</B> opencms-dev-bounces@opencms.org
[mailto:opencms-dev-bounces@opencms.org] <B>On Behalf Of </B>Tim
Daschner<BR><B>Sent:</B> 29. mars 2010 15:33<BR><B>To:</B> The OpenCms mailing
list<BR><B>Subject:</B> Re: [opencms-dev] Properties template and
template-elements<BR></FONT><BR></DIV>
<DIV></DIV>
<P>Ok thanks for the clarification. So, isn't xmlpage itself a type of
structured xmlcontent defined in opencms-modules.XML by some module? If so,
then this usage of template property must come from the template used by that
module. In other words template is not really used by opencms framework but
might be used by a module that alkacon may have written as a part of their
distro. Did I get it right?</P>
<P>Tim<BR></P>
<P>
<BLOCKQUOTE type="cite">On Mar 29, 2010 8:25 AM, "Paul-Inge Flakstad" <<A
href="mailto:flakstad@npolar.no">flakstad@npolar.no</A>> wrote:<BR><BR>
<DIV>
<DIV dir=ltr align=left><SPAN><FONT face=Arial color=#0000ff
size=2>Tim,</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN><FONT face=Arial color=#0000ff
size=2>Just to clearify: for xmlcontent ("Structured content"), the
"template" property isn't used by OpenCms. But for other resource
types, like xmlpage ("Page with free text"), it is used by OpenCms.
</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN><FONT face=Arial color=#0000ff size=2>As far
as I can tell, the "master template" (the surrounding outer
template) works in a slightly different way when working
with xmlpage files, compared to working with xmlcontent
files:</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN><FONT face=Arial color=#0000ff size=2>For
xmlpage, the master template has some <cms:include element="..."
/> statements that include content from the
various element(s) of the xmlpage.</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN><FONT face=Arial color=#0000ff size=2>For
xmlcontent, the master template is included from the xmlcontent's
template, defined in the property "template-elements".</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN><FONT face=Arial color=#0000ff size=2>In
short, xmlpage files need their "template" property
set, xmlcontent files need their "template-elements" property set.
If done correctly, you can use the same master template for
both.</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN><FONT face=Arial color=#0000ff size=2>Best
regards,</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN><FONT face=Arial color=#0000ff
size=2>Paul</FONT></SPAN></DIV><BR>
<BLOCKQUOTE dir=ltr
style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #0000ff 2px solid; MARGIN-RIGHT: 0px">
<DIV lang=en-us dir=ltr align=left>
<HR>
<FONT face=Tahoma size=2>
<P><FONT color=#500050><BR>> From: <A
href="mailto:opencms-dev-bounces@opencms.org">opencms-dev-bounces@opencms.org</A>
[mailto:<A
href="mailto:opencms-dev-bounces@opencms.org">opencms-dev-bounces@opencms.org</A>]
On Behalf Of Tim D...</FONT></P><B>Sent:</B> 29. mars 2010 14:59
<P><FONT color=#500050><BR>> To: The OpenCms mailing
list</FONT></P><B>Subject:</B> Re: [opencms-dev] Properties template and
template-elements<BR></FONT><BR></DIV>
<P><FONT color=#500050>> Thank you folks. Yeah, that's how I have used
the template elements property so far. I was not
awa...</FONT></P></BLOCKQUOTE></DIV><BR><BR>_______________________________________________<BR>This
mail is sent to you from the opencms-dev mailing list<BR>To change your list
options, or to unsubscribe from the list, please visit<BR><A
href="http://lists.opencms.org/mailman/listinfo/opencms-dev"
target=_blank>http://lists.opencms.org/mailman/listinfo/opencms-dev</A><BR></BLOCKQUOTE>
<P></P></BLOCKQUOTE></BODY></HTML>