X-Git-Url: http://git.vanrenterghem.biz/git.ikiwiki.info.git/blobdiff_plain/dcab5e2e48275dbeb3bf514c68826e73abed08bc..129cd00bdb03e32df8645b12138cb4c79952775e:/doc/templates.mdwn diff --git a/doc/templates.mdwn b/doc/templates.mdwn index b40e865e1..07531ae98 100644 --- a/doc/templates.mdwn +++ b/doc/templates.mdwn @@ -9,8 +9,6 @@ wiki. [[!if test="enabled(template) and enabled(inline)" then=""" -## Available templates - These templates are available for inclusion onto other pages in this wiki: @@ -45,6 +43,12 @@ page will provide a link that can be used to create the template. The template is a regular wiki page, located in the `templates/` subdirectory inside the source directory of the wiki. +(Alternatively, templates can be stored in a directory outside the wiki, +as files with the extension ".tmpl". +By default, these are searched for in `/usr/share/ikiwiki/templates`; +the `templatedir` setting can be used to make another directory be searched +first.) + 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 @@ -65,7 +69,7 @@ few things: Here's a sample template: - Name: [[]]
+ Name: \[[]]
Age:
Favorite color:
@@ -83,6 +87,7 @@ that contains it, so you can include WikiLinks and all other forms of wiki markup in the template. Note though that such WikiLinks will not show up as backlinks to the page that uses the template. -Note the use of "raw_name" inside the [[WikiLink]] generator. This ensures -that if the name contains something that might be mistaken for wiki markup, -it's not converted to html before being processed as a [[WikiLink]]. +Note the use of "raw_name" inside the [[ikiwiki/WikiLink]] generator. This +ensures that if the name contains something that might be mistaken for wiki +markup, it's not converted to html before being processed as a +[[ikiwiki/WikiLink]].