aboutsummaryrefslogtreecommitdiff
path: root/doc/plugins/write.mdwn
diff options
context:
space:
mode:
authorJoey Hess <joey@kitenet.net>2010-04-22 15:34:32 -0400
committerJoey Hess <joey@kitenet.net>2010-04-22 15:55:58 -0400
commitabd233931247ef38f1b084afd5906619f02c13b6 (patch)
tree6156798eeefd40ba3b83857112b2b09c57172797 /doc/plugins/write.mdwn
parent23d62f42bd8fe18087cd293962a79d937cf5a3bc (diff)
downloadikiwiki-abd233931247ef38f1b084afd5906619f02c13b6.tar
ikiwiki-abd233931247ef38f1b084afd5906619f02c13b6.tar.gz
look for templates in srcdir and underlays, first
This entailed changing template_params; it no longer takes the template filename as its first parameter. Add template_depends to api and replace calls to template() with template_depends() in appropriate places, where a dependency should be added on the template. Other plugins don't use template(), so will need further work. Also, includes are disabled for security. Enabling includes only when using templates from the templatedir would be nice, but would add a lot of complexity to the implementation.
Diffstat (limited to 'doc/plugins/write.mdwn')
-rw-r--r--doc/plugins/write.mdwn8
1 files changed, 8 insertions, 0 deletions
diff --git a/doc/plugins/write.mdwn b/doc/plugins/write.mdwn
index 9e8c59f63..eaa008131 100644
--- a/doc/plugins/write.mdwn
+++ b/doc/plugins/write.mdwn
@@ -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