From dcab5e2e48275dbeb3bf514c68826e73abed08bc Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Thu, 10 Jul 2008 15:25:05 -0400 Subject: template: Add support for a BASENAME variable. --- IkiWiki/Plugin/template.pm | 2 ++ 1 file changed, 2 insertions(+) (limited to 'IkiWiki/Plugin') 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 => -- cgit v1.2.3