Chon CMS ALPHA

OSGi modular Java CMS

Template Rendering Pipeline

How velocity template renders the page

For each node type there must be a registered NodeRenderer in order to show that node to html (or any other formats). By default system will have "category" and "html" node types.

First, framework ask node renderer what is the base template for that node (default "base.html"). In base.html designer defines common container for all nodes that use it. Most simple example of base template will be:

base.html

(by default "category" and "html" node types use same base.html).

$BODY variable is mandatory here - that is special content from node (the view). 

For category node view representation is defined in "pages/category.html", for html node by default that will be "pages/view.html".

view.html

pages/view.html (injected in above ${BODY} variable)

 

Imagine a node with properties:

      name         = My Node Name

      introText   = My Node Intro Text

      htmlText   = My Node HTML TEXT ...

The output will be:

output.html