
Building Websites with OpenCms

The purpose of a module is to provide a container, easily imported and exported, to hold extensions to OpenCms. The temptation is to consider these 'extensions' to be complex applications including dozens of files of Java code, XML templates, and JARs. While the module mechanism would certainly work well for such an extension, many modules contain only a handful of files—usually templates and JSP files. In fact, some of the modules Alkacon releases are composed entirely of Page documents designed to add documentation and help-text to the system. In Chapter 2, for instance, we installed the help system module, which contains the help text for OpenCms.
Rather than considering modules strictly from the perspective of providing additional code, consider them as vehicles for encapsulating data, be it code or content, that could be useful in situations other than the immediate context. In other words, when looking at a set of data that you think might be a good candidate for a module...
Change the font size
Change margin width
Change background colour