[opencms-dev] Properties template and template-elements

Paul-Inge Flakstad flakstad at npolar.no
Mon Mar 29 15:24:44 CEST 2010


Tim,

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.

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:
For xmlpage, the master template has some <cms:include element="..." /> statements that include content from the various element(s) of the xmlpage.
For xmlcontent, the master template is included from the xmlcontent's template, defined in the property "template-elements".

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.

Best regards,
Paul

________________________________
From: opencms-dev-bounces at opencms.org [mailto:opencms-dev-bounces at opencms.org] On Behalf Of Tim Daschner
Sent: 29. mars 2010 14:59
To: The OpenCms mailing list
Subject: Re: [opencms-dev] Properties template and template-elements


Thank you folks. Yeah, that's how I have used the template elements property so far. I was not aware when and why is the template property used in com's code so I never used it. From this discussion it sounds like the temmplate property is not used at all... so I plan to start using it!

Thanks for opening a new thread!

Tim

On Mar 27, 2010 10:46 PM, "Mathias Lin" <mail at mathiaslin.com<mailto:mail at mathiaslin.com>> wrote:


I have a similar understand about template and template-elements as Paul. For
small sites though I sometimes only use template-elements and no template,
if not necessary.

Using template property is good if you need to support different
theming/layout of the master template (surrounding outer template) and it
cannot solely be done with different css, while the content section
basically remains the same.

@Tim: better to open a new thread with new subject line than capturing an
existing one if the question is different (even if the topics are related).

Regards,
Mathias


Paul-Inge Flakstad wrote:
>
> Hi Tim,
>
> I went ahead and started a new subject, since my reply...

-----
Mathias Lin
Skype: mathias.lin
http://www.mathiaslin.com
--
View this message in context: http://old.nabble.com/Template-property-wiped-when-using-Internet-Explorer-tp28030033p28057057.html
Sent from the OpenCMS - Dev mailing list archive at Nabble.com.


_______________________________________________
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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://webmail.opencms.org/pipermail/opencms-dev/attachments/20100329/e975b597/attachment.htm>


More information about the opencms-dev mailing list