aboutsummaryrefslogtreecommitdiff
path: root/IkiWiki/Render.pm
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 /IkiWiki/Render.pm
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 'IkiWiki/Render.pm')
-rw-r--r--IkiWiki/Render.pm4
1 files changed, 3 insertions, 1 deletions
diff --git a/IkiWiki/Render.pm b/IkiWiki/Render.pm
index 49d080c16..7cf19645e 100644
--- a/IkiWiki/Render.pm
+++ b/IkiWiki/Render.pm
@@ -74,7 +74,9 @@ sub genpage ($$) {
$templatefile=$file;
}
});
- my $template=template(defined $templatefile ? $templatefile : 'page.tmpl', blind_cache => 1);
+ my $template=template_depends(
+ defined $templatefile ? $templatefile : 'page.tmpl', $page,
+ blind_cache => 1);
my $actions=0;
if (length $config{cgiurl}) {