<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML xmlns="http://www.w3.org/TR/REC-html40" xmlns:v =
"urn:schemas-microsoft-com:vml" xmlns:o =
"urn:schemas-microsoft-com:office:office" xmlns:w =
"urn:schemas-microsoft-com:office:word" xmlns:st1 =
"urn:schemas-microsoft-com:office:smarttags"><HEAD>
<META http-equiv=Content-Type content="text/html; charset=us-ascii">
<META content="MSHTML 6.00.5730.11" name=GENERATOR><!--[if !mso]>
<STYLE>v\:* {
BEHAVIOR: url(#default#VML)
}
o\:* {
BEHAVIOR: url(#default#VML)
}
w\:* {
BEHAVIOR: url(#default#VML)
}
.shape {
BEHAVIOR: url(#default#VML)
}
</STYLE>
<![endif]--><o:SmartTagType name="PersonName"
namespaceuri="urn:schemas-microsoft-com:office:smarttags"></o:SmartTagType><!--[if !mso]>
<STYLE>st1\:* {
BEHAVIOR: url(#default#ieooui)
}
</STYLE>
<![endif]-->
<STYLE>@font-face {
font-family: Tahoma;
}
@page Section1 {size: 612.0pt 792.0pt; margin: 72.0pt 90.0pt 72.0pt 90.0pt; }
P.MsoNormal {
FONT-SIZE: 12pt; MARGIN: 0cm 0cm 0pt; FONT-FAMILY: "Times New Roman"
}
LI.MsoNormal {
FONT-SIZE: 12pt; MARGIN: 0cm 0cm 0pt; FONT-FAMILY: "Times New Roman"
}
DIV.MsoNormal {
FONT-SIZE: 12pt; MARGIN: 0cm 0cm 0pt; FONT-FAMILY: "Times New Roman"
}
A:link {
COLOR: blue; TEXT-DECORATION: underline
}
SPAN.MsoHyperlink {
COLOR: blue; TEXT-DECORATION: underline
}
A:visited {
COLOR: purple; TEXT-DECORATION: underline
}
SPAN.MsoHyperlinkFollowed {
COLOR: purple; TEXT-DECORATION: underline
}
P {
FONT-SIZE: 12pt; MARGIN-LEFT: 0cm; MARGIN-RIGHT: 0cm; FONT-FAMILY: "Times New Roman"; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto
}
P.sub {
FONT-SIZE: 12pt; MARGIN-LEFT: 0cm; MARGIN-RIGHT: 0cm; FONT-FAMILY: "Times New Roman"; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto
}
LI.sub {
FONT-SIZE: 12pt; MARGIN-LEFT: 0cm; MARGIN-RIGHT: 0cm; FONT-FAMILY: "Times New Roman"; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto
}
DIV.sub {
FONT-SIZE: 12pt; MARGIN-LEFT: 0cm; MARGIN-RIGHT: 0cm; FONT-FAMILY: "Times New Roman"; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto
}
SPAN.EmailStyle19 {
COLOR: windowtext; FONT-FAMILY: Arial; mso-style-type: personal
}
SPAN.EmailStyle20 {
FONT-WEIGHT: normal; COLOR: purple; FONT-STYLE: normal; FONT-FAMILY: Arial; TEXT-DECORATION: none; mso-style-type: personal-reply
}
DIV.Section1 {
page: Section1
}
</STYLE>
<!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--></HEAD>
<BODY lang=EN-US vLink=purple link=blue>
<DIV dir=ltr align=left><SPAN class=137530717-14112006><FONT face=Arial
color=#0000ff size=2>Sorry; I didn't answer your question very
directly.</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=137530717-14112006><FONT face=Arial
color=#0000ff size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=137530717-14112006><FONT face=Arial
color=#0000ff size=2>The template used to render an XML content item is not
selectable by the user; it has to be set using the template-elements property,
which should contain the path of the JSP acting as the so-called template for
the resource. It's this JSP which acts as the whole view and which
therefore generates navigation etc (typically by including other JSPs as well as
containing JSP code of its own).</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=137530717-14112006><FONT face=Arial
color=#0000ff size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=137530717-14112006><FONT face=Arial
color=#0000ff size=2>Typically, though, you don't need to expect a workplace
user to set the property themselves. For </FONT></SPAN><SPAN
class=137530717-14112006><FONT face=Arial color=#0000ff size=2>a custom XML
content type, i.e. one you've defined, then you can have the template-elements
property set automatically on creation of the resource. This is the same
thing as saying "the view for XML content items of this type is generally _this_
JSP." Here's a snippet from opencms-modules.xml for one of my XML content
types, 'article', which uses this pattern:</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=137530717-14112006><FONT face=Arial
color=#0000ff size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=137530717-14112006><FONT face=Arial
color=#0000ff
size=2> <resourcetypes><BR> <type
class="org.opencms.file.types.CmsResourceTypeXmlContent" name="article"
id="80"><BR> <properties><BR> <property><BR> <!--
Determines behaviour of editor in outputting contents
--><BR> <name>content-conversion</name><BR> <value
type="shared"><BR> <![CDATA[cleanup;xhtml]]><BR> </value><BR> </property><BR> <property><BR> <!-- This
property is set to define the JSP used to render the resource.
--><BR> <name>template-elements</name><BR> <value
type="shared"><BR> <![CDATA[/system/modules/mymodulename/template-elements/article.jsp]]><BR> </value><BR> </property><BR> </properties><BR> <copy-resources
/><BR> <param
name="schema">/system/modules/mymodulename/schemas/article.xsd</param><BR> </type><BR>...</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=137530717-14112006></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=137530717-14112006><FONT face=Arial
color=#0000ff size=2>Jon</DIV></FONT></SPAN><BR>
<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>Olli
Aro<BR><B>Sent:</B> 14 November 2006 15:47<BR><B>To:</B> 'The OpenCms mailing
list'<BR><B>Subject:</B> RE: [opencms-dev] Template selection for
XMLContent<BR></FONT><BR></DIV>
<DIV></DIV>
<DIV class=Section1>
<P class=MsoNormal><FONT face=Arial color=purple size=2><SPAN
style="FONT-SIZE: 10pt; COLOR: purple; FONT-FAMILY: Arial">Yes that gets me the
content from the XML content items, but how do I get the template around the
content area (all navigation menus etc.)? If you create a normal content item
you get the selection list where you can then select e.g. TemplateOne, but
XMLContent does not seem to have this selection
list.<o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial color=purple size=2><SPAN
style="FONT-SIZE: 10pt; COLOR: purple; FONT-FAMILY: Arial"><o:p> </o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial color=purple size=2><SPAN
style="FONT-SIZE: 10pt; COLOR: purple; FONT-FAMILY: Arial">Olli<o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial color=purple size=2><SPAN
style="FONT-SIZE: 10pt; COLOR: purple; FONT-FAMILY: Arial"><o:p> </o:p></SPAN></FONT></P>
<DIV>
<DIV class=MsoNormal style="TEXT-ALIGN: center" align=center><FONT
face="Times New Roman" size=3><SPAN style="FONT-SIZE: 12pt">
<HR tabIndex=-1 align=center width="100%" SIZE=2>
</SPAN></FONT></DIV>
<P class=MsoNormal><B><FONT face=Tahoma size=2><SPAN
style="FONT-WEIGHT: bold; FONT-SIZE: 10pt; FONT-FAMILY: Tahoma">From:</SPAN></FONT></B><FONT
face=Tahoma size=2><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Tahoma">
opencms-dev-bounces@opencms.org [mailto:opencms-dev-bounces@opencms.org]
<B><SPAN style="FONT-WEIGHT: bold">On Behalf Of </SPAN></B>Jonathan
Woods<BR><B><SPAN style="FONT-WEIGHT: bold">Sent:</SPAN></B> 14 November 2006
15:39<BR><B><SPAN style="FONT-WEIGHT: bold">To:</SPAN></B> '<st1:PersonName
w:st="on">The OpenCms mailing list</st1:PersonName>'<BR><B><SPAN
style="FONT-WEIGHT: bold">Subject:</SPAN></B> RE: [opencms-dev] Template
selection for XMLContent</SPAN></FONT><o:p></o:p></P></DIV>
<P class=MsoNormal><FONT face="Times New Roman" size=3><SPAN
style="FONT-SIZE: 12pt"><o:p> </o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial color=blue size=2><SPAN
style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: Arial">If on a particular
resource you set the value of the property called 'template-elements' to the
path of a JSP, then OpenCms will 'call' that JSP when a user requests that
resource. Of course, the action of the JSP is normally to include data
from the XML content item, i.e. to act as its view, but not necessarily
so.</SPAN></FONT><o:p></o:p></P>
<P class=MsoNormal><FONT face="Times New Roman" size=3><SPAN
style="FONT-SIZE: 12pt"> <o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial color=blue size=2><SPAN
style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: Arial">Jon</SPAN></FONT><o:p></o:p></P>
<P class=MsoNormal><FONT face="Times New Roman" size=3><SPAN
style="FONT-SIZE: 12pt"> <o:p></o:p></SPAN></FONT></P>
<DIV class=MsoNormal style="TEXT-ALIGN: center" align=center><FONT
face="Times New Roman" size=3><SPAN style="FONT-SIZE: 12pt">
<HR tabIndex=-1 align=center width="100%" SIZE=2>
</SPAN></FONT></DIV>
<P class=MsoNormal style="MARGIN-BOTTOM: 12pt"><B><FONT face=Tahoma size=2><SPAN
style="FONT-WEIGHT: bold; FONT-SIZE: 10pt; FONT-FAMILY: Tahoma">From:</SPAN></FONT></B><FONT
face=Tahoma size=2><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Tahoma">
opencms-dev-bounces@opencms.org [mailto:opencms-dev-bounces@opencms.org]
<B><SPAN style="FONT-WEIGHT: bold">On Behalf Of </SPAN></B>Olli Aro<BR><B><SPAN
style="FONT-WEIGHT: bold">Sent:</SPAN></B> 14 November 2006 12:00<BR><B><SPAN
style="FONT-WEIGHT: bold">To:</SPAN></B> '<st1:PersonName w:st="on">The OpenCms
mailing list</st1:PersonName>'<BR><B><SPAN
style="FONT-WEIGHT: bold">Subject:</SPAN></B> [opencms-dev] Template selection
for XMLContent</SPAN></FONT><o:p></o:p></P>
<P class=MsoNormal><FONT face=Arial size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">Hi all,<o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"><o:p> </o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">I am trying to surround XMLContent
with a template and noticed that when a user creates a new XMLContent item there
is no selection for template. Do I need to exit the creation JSP in order to
introduce this for XMLContent or is there a different way in order to allow the
users to select template for their XML content?<o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"><o:p> </o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">Regards,<o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"><o:p> </o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">Olli <o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"><o:p> </o:p></SPAN></FONT></P>
<P class=sub style="TEXT-ALIGN: center" align=center><FONT
face="Times New Roman" size=3><SPAN
style="FONT-SIZE: 12pt"><o:p> </o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face="Times New Roman" size=3><SPAN
style="FONT-SIZE: 12pt"><o:p> </o:p></SPAN></FONT></P></DIV></BODY></HTML>