[opencms-dev] Upgrade to OpenCMS 10: Template questions

John Bieling john.bieling at gmx.de
Wed Apr 20 14:22:53 CEST 2016


Hi,

we upgraded from 7.5 to 10 and it worked almost without any changes. 
During the update I had to select a site to update and I selected 
"/sites/default" which is empty and does not contain my actual site. 
After the update, everything was working fine - however I am still using 
an old template style. But I have problems with the terminology. So 
before starting with migration, I need to know "what I have" :-)

We have a custom resource type hooked into opencms-modules with a custom 
XSD which includes another nested custom XSD.

             <resourcetypes>
              <type 
class="org.opencms.file.types.CmsResourceTypeXmlContent" 
name="Stammseite" id="91">
                     <param 
name="schema">/system/modules/mymodule/schemas/simplepage.xsd</param>
                 </type>
             </resourcetypes>
             <explorertypes>
                 <explorertype name="Stammseite" 
key="fileicon.simplepage" icon="layoutpage.gif" 
bigicon="layoutpage_big.png" reference="xmlcontent">
                     <newresource page="mygroup" 
uri="newresource_xmlcontent.jsp?newresourcetype=Stammseite" order="0" 
autosetnavigation="true" autosettitle="false" info="desc.simplepage"/>
                     <accesscontrol>
                         <accessentry principal="GROUP.mygroup" 
permissions="+r+v+w+c"/>
                     </accesscontrol>
                 </explorertype>
             </explorertypes>

That XSD defines "elements" like title, teaser, teaserimg, content etc. 
Up to know, the editors only used the backend to edit content / add 
files. Editing a content file presented a mask containing the defined 
elements.

The root folder of my site has a "template-elements" property pointing 
to my template.jsp. That jsp is a pure jsp file using
- cmsObject.getRequestContext()
- cmsObject.getNavigation()
- CmsXmlContent data = CmsXmlContentFactory.unmarshal(cmsObject, 
cmsObject.readFile(thisFile));

to get all the information needed.

What template technology is that? Is it possible to keep that technology 
and still use the new SiteMap-Editor or Page-Editor or do I have to 
migrate to container pages (which is the technology used in OpenCMS 10, 
I guess?)


Follow-Up Question: IF I had selected my actual site during update, 
would the updater convert my site from the old template technique to 
container-pages automatically?

Yours
John



More information about the opencms-dev mailing list