wiki.
[[if test="enabled(template) and enabled(inline)" then="""
+
+## Available templates
+
These templates are available for inclusion onto other pages in this
wiki:
sort=title template=titlepage]]
"""]]
+## Using a template
+
Using a template works like this:
\[[template id=note text="""Here is the text to insert into my note."""]]
* Really 8 and a half.
"""]]
+## Creating a template
+
To create a template, simply add a template directive to a page, and page will
provide a link that can be used to create the template. The template is a
regular wiki page, located in the `templates/` directory.
-The template uses the syntax used by the
-[cpan HTML::Template](http://search.cpan.org/search?mode=dist&query=HTML::Template)
-perl module, which allows for some fairly complex things to be done.
-Consult its documentation for the full syntax, but all you really need to know
-are a few things:
+The template uses the syntax used by the [[cpan HTML::Template]] perl
+module, which allows for some fairly complex things to be done. Consult its
+documentation for the full syntax, but all you really need to know are a
+few things:
* To insert the value of a variable, use `<TMPL_VAR variable>`.
* To make a block of text conditional on a variable being set use