[opencms-dev] Template selection for XMLContent
Olli Aro
olli_aro at yahoo.co.uk
Tue Nov 14 22:56:57 CET 2006
Yes, I suppose what got me confused is that while with normal content you inject the content in template (using e.g. <cms:include element="body"/>), while with the XMLContent you kind of inject the template to the content. I was hoping that I could have done something like <cms:include element="newsbody"/> and that then would have called the view JSP in order to inject the XMLContent view to my generic template.
The current design also means that if people wish to use the default OpenCms content types within their own templates (other than TemplateOne), they have to rewrite all view JSP for the content types, which is a shame. Or am I still missunderstanding this?
Also, how do you share the content types e.g. between 2 different sub sites with the current framework? Other than building some logic in the template to cope with this as you were suggesting earlier.
Sorry to keep going on about this, but I still find it a bit confusing...
Olli
----- Original Message ----
From: Jonathan Woods <jonathan.woods at scintillance.com>
To: The OpenCms mailing list <opencms-dev at opencms.org>
Sent: Tuesday, 14 November, 2006 6:06:25 PM
Subject: RE: [opencms-dev] Template selection for XMLContent
No idea why - I guess the designers felt that an article's an article, a calendar entry is a calendar entry, and so on... so there'd need only be one way for the content item to be rendered.
Of course, your custom XML content could contain a data item which itself gives a cue to the template-elements JSP about how to render the content, and your JSP could take notice of this value accordingly.
Jon
From: opencms-dev-bounces at opencms.org [mailto:opencms-dev-bounces at opencms.org] On Behalf Of Olli Aro
Sent: 14 November 2006 17:50
To: 'The OpenCms mailing list'
Subject: RE: [opencms-dev] Template selection for XMLContent
Yes you are right, it is the traditional way. I just have used only cms:includes in my templates before, so concept of cms:template elements is new to me and means that I have to restructure my templates in order to get XMLContent working properly L
Regarding the missing template dropdown – any ideas why this has been dropped out for XMLContent and would it be easy to put it back in? I could imagine that users might still want to select between different templates for their XMLContent as well.
Olli
From: opencms-dev-bounces at opencms.org [mailto:opencms-dev-bounces at opencms.org] On Behalf Of Jonathan Woods
Sent: 14 November 2006 17:22
To: ' The OpenCms mailing list '
Subject: RE: [opencms-dev] Template selection for XMLContent
This is the same as a traditional template, isn't it? Except that the user can't select from a drop-down which JSP is used to perform the rendition.
From: opencms-dev-bounces at opencms.org [mailto:opencms-dev-bounces at opencms.org] On Behalf Of Olli Aro
Sent: 14 November 2006 16:39
To: ' The OpenCms mailing list '
Subject: RE: [opencms-dev] Template selection for XMLContent
Aaah, so it looks like OpenCms expects property template-elements to be populated for all XMLContent and then you have to define there references to template headers and footers. Is there any way to switch this functionality off and use a “traditional” template for XMLContent?
Regards,
Olli
From: opencms-dev-bounces at opencms.org [mailto:opencms-dev-bounces at opencms.org] On Behalf Of Olli Aro
Sent: 14 November 2006 15:47
To: ' The OpenCms mailing list '
Subject: RE: [opencms-dev] Template selection for XMLContent
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.
Olli
From: opencms-dev-bounces at opencms.org [mailto:opencms-dev-bounces at opencms.org] On Behalf Of Jonathan Woods
Sent: 14 November 2006 15:39
To: ' The OpenCms mailing list '
Subject: RE: [opencms-dev] Template selection for XMLContent
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.
Jon
From: opencms-dev-bounces at opencms.org [mailto:opencms-dev-bounces at opencms.org] On Behalf Of Olli Aro
Sent: 14 November 2006 12:00
To: ' The OpenCms mailing list '
Subject: [opencms-dev] Template selection for XMLContent
Hi all,
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?
Regards,
Olli
_______________________________________________
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
___________________________________________________________
All new Yahoo! Mail "The new Interface is stunning in its simplicity and ease of use." - PC Magazine
http://uk.docs.yahoo.com/nowyoucan.html
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://webmail.opencms.org/pipermail/opencms-dev/attachments/20061114/a7c24e68/attachment.htm>
More information about the opencms-dev
mailing list