Setup Content Modules

There are situations where fixed content item structure in content types is too restrictive for the author. The plugin-cm-modules in OpenWGA adds a new concept of "content modules" to the OpenWGA Content Manager. Content Modules are ready to use "intelligent page fragments" the author can add to a page in a structure suitable for exactly the page content he is working on.

This tutorial explains how to setup and use the content modules plugin with OpenWGA 5.4 and later.


Add the following line to the HTML-Head section of your outer layout:



  <tml:include designdb="plugin-cm-modules" ref="htmlhead-includes"/>



The included TML module ensures that all CSS and JavaScripts necessary to run the content modules from the cm-plugin are available to your site.

Include the module renderer

Inside the TML that renders your content type add an include of "modules:render" from the cm-modules plugin:


<tml:include designdb="plugin-cm-modules" ref="modules:render"/>


This peace of code will render the content modules configured by the author at the position of the include.

If you want to allow your authors to use all available content modules that's alle you have to do. Otherwise continue reading how to restrict the allowed modules.

Optional define allowed/disallowed content modules

By default all registered modules are available to use by the content authors. If you want to restrict the allowed modules include either and option "modules" for a positive list or an option "exclude-modules" for a netagive list of module IDs in your <tml:include ref="modules:render>.


<tml:include designdb="plugin-cm-modules" ref="modules:render">

  <tml:option name="exclude-modules">cm_google_map, cm_google_weather</tml:option>


This will allow all available content modules to be used in the corresponding content type except google maps and google weather forecast.

You can find the list of all registered moduls and its IDs using the OpenWGA admin client and select section "plugins - content modules".

Continue on next page ...