aboutsummaryrefslogtreecommitdiff
path: root/IkiWiki/Plugin/template.pm
diff options
context:
space:
mode:
authorJoey Hess <joey@kodama.kitenet.net>2008-07-10 15:25:05 -0400
committerJoey Hess <joey@kodama.kitenet.net>2008-07-10 15:25:42 -0400
commitdcab5e2e48275dbeb3bf514c68826e73abed08bc (patch)
treeef2c1e12d0fda33da1fc0baa9bff6166018a27a7 /IkiWiki/Plugin/template.pm
parentc52493422bfa0b5c58c6f952a77c769ac01f11f3 (diff)
downloadikiwiki-dcab5e2e48275dbeb3bf514c68826e73abed08bc.tar
ikiwiki-dcab5e2e48275dbeb3bf514c68826e73abed08bc.tar.gz
template: Add support for a BASENAME variable.
Diffstat (limited to 'IkiWiki/Plugin/template.pm')
-rw-r--r--IkiWiki/Plugin/template.pm2
1 files changed, 2 insertions, 0 deletions
diff --git a/IkiWiki/Plugin/template.pm b/IkiWiki/Plugin/template.pm
index a6e34fcc9..aa1f57c07 100644
--- a/IkiWiki/Plugin/template.pm
+++ b/IkiWiki/Plugin/template.pm
@@ -45,6 +45,8 @@ sub preprocess (@) { #{{{
return "[[template ".gettext("failed to process:")." $@]]";
}
+ $params{basename}=IkiWiki::basename($params{page});
+
foreach my $param (keys %params) {
if ($template->query(name => $param)) {
$template->param($param =>