Controller that passes a map of URLs to it's view (the template). The view
is responsible for including the URLs (using a RequestDispatcher) at the
right place.
The most simple way to achieve this is to use a JSTL view that contains
a <c:import value="${slotname}" /> tag for each
slot, where slotname has to be one of the keys present
in the controllers configuration map.
You may extend existing template configurations by setting the
TemplateController.setParent(TemplateController) parent property to another
TemplateController. The local configuration will then be merged with the
one of the parent, overriding previously defined URLs.
Additionally the controller supports nested templates, i.e. the URL of a
slot may in turn map to another TemplateController. These nested structures
are taken into account when configurations are merged. When extending a
parent you may also override URLs defined in nested templates.
Let's say Template A has two slots, left and right. The right
slot includes another Template B which also has two slots top and
bottom, where top contains the URL /foo.html .
We can now define a third TemplateController A2 which extends A:
<template:definition name="A2" parent="A">
<template:insert slot="right.top" url="/bar.html" />
</template:definition>
The syntax above makes use of the Spring 2.0 namespace support. See
org.riotfamily.website.template.config.TemplateNamespaceHandler for more information.
author: Alf Werder author: Felix Gnass |