<![CDATA[Dynamic function demo]]> Since OpenCms 8.0.2  a new resource "Dynamic Functionality" is introduced. The new resource type make it possible to drag and drop a dynamic content provided by a jsp directly into a container page of  the web site. Typical use case is extending of the web site by a search or login functionality.

In this demo example a simple date display is added in a box, which can be dropped in one of the side containers. The settings are used to set the format and the style of the date. The locale is provided by the request paremeter specified in the xmlcontent.

 

How to use "Dynamic Functionality":

  • Drop a new resource of type "Dynamic Funcionality" into the container page and configure it as xmlcontent from ADE.
  • Set the title, which is used for this resource in the add wizard.
  • Define the path to the jsp, which provides the required functionality in the xml field "Funtion  provider".
  • Some optional request parameters can be deifined in the xml field "Parameters".
  • In the xml field "Formatter options" the type of the container as well as its min and max width can be defined to control the container, in which this resource can be dropped.
  • Additionally define the setting in the second tab directly in the xmlContent editor. Use the same options as inside of the scheme definition for the resource type.

Important note: The html output provided by the used jsp should be surrounded by a <div> tag, similar to the formatter jsp.

 

 

]]>