From 54898d16d4c86fddcb1b5588eac67a729c14deeb Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Fri, 23 Apr 2010 14:44:37 -0400 Subject: allow a bare page name to be specified as a template --- doc/plugins/write.mdwn | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'doc/plugins/write.mdwn') 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($$;@)` -- cgit v1.2.3