X-Git-Url: http://git.vanrenterghem.biz/git.ikiwiki.info.git/blobdiff_plain/eb92d09360e871f4af059c30e70cf7f0b24315e2..195943e588b8c7b6a3a43d10404d2d40a503c1d5:/doc/templates.mdwn?ds=sidebyside diff --git a/doc/templates.mdwn b/doc/templates.mdwn index 41542e22c..07531ae98 100644 --- a/doc/templates.mdwn +++ b/doc/templates.mdwn @@ -5,7 +5,7 @@ else="This wiki has templates **disabled**." ]] Templates are files that can be filled out and inserted into pages in the -wiki, using the [[ikiwiki/directive/template]] [[ikiwiki/directive]]. +wiki. [[!if test="enabled(template) and enabled(inline)" then=""" @@ -43,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 @@ -81,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]].