Hi, I have a doubt regarding xml structured content in OpenCms. I have two XML schemas, one for editing the top menus (menus are same across all the pages) and another schema for editing the page content. In the template jsp file i need to access xml element contents from both the schema files. How to go for that? do i have to specify something in ?
A:
You can embed one xsd into another. First you define your menu via menu.xsd, then you include it like this in your i.e. page.xsd:
<xsd:include schemaLocation="opencms://system/modules/com.yourmodule.www/schemas/menu.xsd"/>
...
<xsd:element name="Menu" type="OpenCmsMenu" minOccurs="1" maxOccurs="1" />
where 'OpenCmsMenu' needs to be the type name as you defined it in your menu.xsd.
Mathias Lin
2010-09-02 08:16:54
A:
An alternative solution might be to generate the menus from the folder structure. That is the usual method to deal with menus in OpenCms.
Andreas Kuckartz
2010-09-04 13:03:58