aboutsummaryrefslogtreecommitdiff
path: root/doc/plugins/write.mdwn
diff options
context:
space:
mode:
authorJoey Hess <joey@kitenet.net>2010-04-23 14:44:37 -0400
committerJoey Hess <joey@kitenet.net>2010-04-23 14:44:37 -0400
commit54898d16d4c86fddcb1b5588eac67a729c14deeb (patch)
treefd401da58dda87274edd5b0eac308c86819c3564 /doc/plugins/write.mdwn
parent011d88052d6dacb6a9d84b1489d37eefeb992da1 (diff)
downloadikiwiki-54898d16d4c86fddcb1b5588eac67a729c14deeb.tar
ikiwiki-54898d16d4c86fddcb1b5588eac67a729c14deeb.tar.gz
allow a bare page name to be specified as a template
Diffstat (limited to 'doc/plugins/write.mdwn')
-rw-r--r--doc/plugins/write.mdwn11
1 files changed, 9 insertions, 2 deletions
diff --git a/doc/plugins/write.mdwn b/doc/plugins/write.mdwn
index eaa008131..1407b5a12 100644
--- a/doc/plugins/write.mdwn
+++ b/doc/plugins/write.mdwn
@@ -702,8 +702,15 @@ the entire wiki build and make the wiki unusable.
### `template($;@)`
Creates and returns a [[!cpan HTML::Template]] object. The first parameter
-is the name of the file in the template directory. The optional remaining
-parameters are passed to `HTML::Template->new`.
+is the name of the template file. The optional remaining parameters are
+passed to `HTML::Template->new`.
+
+The template file is first looked for in the templates/ subdirectory of the
+srcdir. Failing that, it is looked for in the templatedir. Typically
+the filename will have a ".tmpl" extension. If a filename with no extension
+is passed, a wiki page in templates/ with its name is used as the template.
+That should only be done for templates which it is safe to let wiki users
+edit.
### `template_depends($$;@)`