OpenCms 9 provides great new features that build on the success of the “Advanced Direct Edit” (ADE) concept introduced with version 8. Updating from OpenCms 8 to version 9 is easy and straightforward. Updating from OpenCms 7 to 9 is also easy, but you won’t be able to use the ADE features without modifying your existing templates .
In this workshop, Michael will share over 2 years of project experience updating OpenCms 7 installations to the ADE template standard. He will show how to create templates that work with version 7 and version 9 content, using shared layout and code. Using this approach, he will explain a step by step method to update a version 7 website, so that it uses all the ADE features of version 9 in the end.
Michael will also show how to add features introduced in version 9 such as individual detail containers to your existing OpenCms 8 installation.
2. ● Updating your OpenCms installation
● Building a multi-version template
● Show differences between different template technologies in
OpenCms 6,7,8 and 9
● How to make a template that can be used for all template
technologies
● Showcase: Modify a website build with
xmlpages and xmlcontents into containerpages
for OpenCms 9.
● Make a smooth transition from xmlpages and xmlxontents to
continerpages
● Use both technologies at the same time
● Adjust existing xmlcontents
2
Agenda
4. Good news:
Your existing OpenCms 8.x webapp will
run in OpenCms 9 – without any changes
(Ok, at least if you do not use OpenCms 8.0…)
4
Updating from OpenCms 8 to 9
5. How to upgrade:
Use the OpenCms update wizard!
5
Updating from OpenCms 8 to 9
6. Good news:
Your existing OpenCms 7.x webapp will
run in OpenCms 9 – most likely without
any changes
We will see this in the showcase later
6
Updating from OpenCms 7 to 9
7. How to upgrade:
Use the OpenCms update wizard!
Switch to Containerpage-technology.
7
Updating from OpenCms 7 to 9
8. Because of several API changes between
OpenCms 6 and newer versions, your
existing OpenCms 6.x webapp will require
some changes to run in OpenCms 9
8
Updating from OpenCms 6 to 9
9. How to upgrade:
Make a fresh OpenCms 9 installation and
import your modules and content
Switch to Containerpage-technology.
9
Updating from OpenCms 6 to 9
11. Different technologies in different OpenCms versions
require different templates:
● XML-Pages (OpenCms 6 and 7)
● XML-Contents (OpenCms 6 and 7)
● Containerpages (OpenCms 8 and 9)
Make a template that can be used for all those
technologies
Allows smooth transition between different
technologies
11
Multi version template
17. ● Provide a „Base-Template“ with HTML for a common
head and foot
● Individual template files for V6/7 and V8/9 include
componentes of the base template
● „Main content area“ defined individual in V6/7 and V8/9
template file
● Important: Different direct edit tags required for pre-
containerpage and containerpag template file
Parallel usage of both version, smooth content
transition possible
17
Multi-version template (MVT)
24. ● Start with:
● OpenCms 6/7 Website, XML-pages & XML-contents,
running on OpenCms 9
● 6 Steps to do:
1. Build new multiversion template
2. Use new template with XML-pages & XML-contents
3. Enable OpenCms 8/9 sitemap, use new template
with container pages
4. Replace XML-pages with new XML-contents &
formatters in containerpages
5. Modifiy exisiting XML-contents
6. Content enhancements for OpenCms 9
24
Migrate a website to OpenCms 9
30. ● If the template was defined at the site folder:
● Change the template at the site folder
● If template was set on each page:
● Use the content-tool to change the template
property value
30
Changeing the template
33. ● How to make our site Sitemap & ADE enabled
(Hen & egg problem):
● Change the site folder to a subsitemap
● Create a „sitemap content folder“ in the site, the name
MUST be „.content“
● Inside, create a folder named „.new“
● Inside, create a model page (containerpage)
● Set the template property of our model page to the
new template
● Configure the model page in the sitemap configuration
DONE, we now can use the sitemap to create new
pages
33
Enable the sitemap
36. ● Create new module with simple XSD as
replacement
● Title, Text, Image in our example
● Add resourcetype in opencms-modules.xml
● Write formatter
● Register the content in the Module-config
(„.config“ file)
new content can now be used
36
Replace XML-pages
40. ● Modify the existing XSD
● Formatter, Title and URL mapping
● Write formatter
● Use old detail.jsp for it
● Register the content in the Module-config
(„.config“ file)
Modified content can now be used
40
Modify XML-contents
42. ● Typical example: News list
● Move existing news contents to new location under
„.content“
● Define Function Elements
● Can be inserted via Drag&Drop (Dynamic Functions)
● Reuse existing JSPs
● Optional: Make them configurable via settings
● Define Setting in Function Element
● Access setting in JSP
● Define Detailpages
42
Lists of XML contents