diff options
author | Joey Hess <joey@kodama.kitenet.net> | 2008-07-10 15:25:05 -0400 |
---|---|---|
committer | Joey Hess <joey@kodama.kitenet.net> | 2008-07-10 15:25:42 -0400 |
commit | dcab5e2e48275dbeb3bf514c68826e73abed08bc (patch) | |
tree | ef2c1e12d0fda33da1fc0baa9bff6166018a27a7 /IkiWiki | |
parent | c52493422bfa0b5c58c6f952a77c769ac01f11f3 (diff) |
template: Add support for a BASENAME variable.
Diffstat (limited to 'IkiWiki')
-rw-r--r-- | IkiWiki/Plugin/template.pm | 2 |
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 => |