Creating Plug & Play Modules for OpenCms 8

Track: Workshop
Speaker: Rüdiger Kurz (Alkacon Software GmbH)

Abstract

OpenCms, since its first public version, features a module mechanism that allows encapsulating functionalities in separate modules. However, the template mechanism of OpenCms up to version 7.5 left many details to the developer. It turned out that developing reusable modules is quite difficult, since there used to be many dependencies from a module to the template it was developed for. The improved template and module mechanism of OpenCms 8 addresses these issues, removes theses dependencies and therefore allows creating modules that are not depended on the template.

Rüdigers presentation did include an overview of the problem with pre-OpenCms 8 modules using the “Template 2” example from the OpenCms 7.x distribution. He did then show how the problems have been addressed in OpenCms 8. Among other things, this includes the possibility to create HTML output that is rendered differently depending on the space available in the template.

Best practices for structuring modules were also explained, for example how to layout module resources in different folders and naming conventions we suggest.

Latest News

  • OpenCms 18 available

    Oct 8, 2024 - OpenCms 18 adds a new "Place element" mode in the page editor that allows precise element placement as an alternative to drag & drop. Reused content is now clearly marked. Automatic typographical correction of quotation marks has been added to all of the editors. “Dead links” in content that is entered in a WYSIWYG editor are now automatically disabled. Our Mercury template includes several new features, such as setting different image formats for mobile and desktop and many more.

  • OpenCms 18 Release Notes

    Oct 8, 2024 - The OpenCms 18 release notes contain detailed information about the new features and fixes in this version.

  • Alkacon OCEE 18

    Oct 8, 2024 - Alkacon OCEE 18 is the latest OCEE release for OpenCms 18. This version features a license key mechanism that allows to share the license key on several servers in a cloud installation.

  • Documentation website for the Mercury template

    Jul 8, 2024 - The Mercury template from Alkacon Software is a comprehensive, modular template based on Bootstrap 5 for OpenCms. This feature-rich template now has a complete and exhaustive documentation website.

Try the OpenCms Live Demo