]> scripts.mit.edu Git - www/ikiwiki.git/blobdiff - doc/plugins/write.mdwn
fix logic
[www/ikiwiki.git] / doc / plugins / write.mdwn
index 404c3b44f3ace0123194a29c14c5ede32d2be3dc..eaa0081319d223a0934b7b48d4edbaf27eac501e 100644 (file)
@@ -315,9 +315,9 @@ a new custom parameter to the template.
 
 This hook allows plugins to change the [[template|wikitemplates]] that is
 used for a page in the wiki. The hook is passed a "page" parameter, and
-should return the name of the template file to use, or undef if it doesn't
-want to change the default ("page.tmpl"). Template files are looked for in
-/usr/share/ikiwiki/templates by default.
+should return the name of the template file to use (relative to the
+template directory), or undef if it doesn't want to change the default
+("page.tmpl").
 
 ### sanitize
 
@@ -705,6 +705,14 @@ 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`.
 
+### `template_depends($$;@)`
+
+Use this instead of `template()` if the content of a template is being
+included into a page. This causes the page to depend on the template,
+so it will be updated if the template is modified.
+
+Like `template()`, except the second parameter is the page.
+
 ### `htmlpage($)`
 
 Passed a page name, returns the base name that will be used for a the html