sunlabs.brazil.template
Class TemplateTemplate
java.lang.Object
sunlabs.brazil.template.Template
sunlabs.brazil.template.TemplateTemplate (view source)
- All Implemented Interfaces:
- TemplateInterface
public class TemplateTemplate
- extends Template
Template class for processing markup through a sequence of template filters.
The markup may be processed in a different template context than the
current page.
This class processes:
<template data=... [id=... name=... token=... prefix=...ignore=true|false]>
- data
- contains the markup to process.
- prefix
- Which prefix to assign the templates, if the "token" list contains
class names. Defaults to our prefix.
- id
- names the SessionID to use to process the content, Defaults to the
current SessionID.
- token
- names the request property that
contains the
class names or tokens that will define the templates that will process
the data (see the
TemplateFilter
discussion
regarding the templates property). It defaults to "templates" with
this class's prefix.
- ignore
- If true, the result of the template processing is ignored.
by default it is inserted into the resultant markup.
- name
- If specified, the result is placed in this variable instead
of being emitted inline.
The templates for processing each token are setup only once,
the first time the token is referenced.
If "prefix" and "token" are not specified, the markup is
processed through the same set of templates as the current page.
Specifying "token" allows the markup to be processed by a different
set of templates as the page; using a different prefix allows the
markup to be processed through templates using a different set of
configuration options.
Note that since only one template may be active at a time for a
given "token" and "id", care must be taken to avoid deadlock: make sure
the "id" or "token" (or both) is different than the current page.
Fields inherited from class sunlabs.brazil.template.Template |
debug |
TemplateTemplate
public TemplateTemplate()
tag_template
public void tag_template(RewriteContext hr)