[opencms-dev] open questions about XML content

Andy Kriger akriger at greaterthanone.com
Wed Nov 10 16:47:14 CET 2004


Thank you for the thorough list of answers. A couple followup questions...

1) From the example posted on the mailing list, XML content uses the
template-element property to determine its display page. However, if I have
multiple types of content in a single directory, how can I direct one type
to display with one page and another to display with a different page? Is
the use of template-elements hard coded? 

* Currently you can't mix differnet XML content types in one directory and
attach the "template-elements" to the folder. If you want to have multiple
XM Lcontent types in one folder, you must attach "template-elements" to each
file manually.

Q: Is there any way to programmatically change the template-elements
property before the file is processed (without getting into changing the
source code)? I'm wondering if there would be a way to insert code at the
top of a template, for example, that would determine the template-elements
setting before the template is processed.

-----

2) Create a content schema, create several items based on the schema, then
add more fields to the schema. New items of that type will have the new
fields. Editing older items will not show the new fields. Is there any way
to automatically bring older items up-to-date with a modified schema? 

* No. Currently not.

Q: Is there a programmatic way to add information to an existing XML content
resource? For example, using CmsObject or some other back-end object, could
I access the resource and add empty values for the new fields such that
those fields then appear in the Workplace form when the resource is edited?
If so then I could write a workaround to auto-update resources on schema
updates.





More information about the opencms-dev mailing list