]> sipb.mit.edu Git - ikiwiki.git/commitdiff
add separate template variable for tag page and sanitize displayed tag name
authorJoey Hess <joey@kitenet.net>
Wed, 21 Apr 2010 23:09:59 +0000 (19:09 -0400)
committerJoey Hess <joey@kitenet.net>
Wed, 21 Apr 2010 23:13:03 +0000 (19:13 -0400)
IkiWiki/Plugin/tag.pm
templates/autotag.tmpl

index c98dd80b29620434087db459ff93a55dff7a5dee..6a6517671c3331909edb4ce60d4c920bc942e1c8 100644 (file)
@@ -83,7 +83,8 @@ sub gentag ($) {
                        debug($message);
 
                        my $template=template("autotag.tmpl");
-                       $template->param(tag => $tag);
+                       $template->param(tag => IkiWiki::basename($tag));
+                       $template->param(tagpage => $tagpage);
                        writefile($tagfile, $config{srcdir}, $template->output);
                        if ($config{rcs}) {
                                IkiWiki::disable_commit_hook();
index a8824171b46539ab6834b87e3a3becb63892745a..7b0d4c90fdafdd2a3396639115168a20ff3f35e1 100644 (file)
@@ -1,3 +1,3 @@
-## Pages tagged <TMPL_VAR TAG> ##
+## Pages tagged <TMPL_VAR TAGNAME> ##
 
 [[!inline pages="tagged(<TMPL_VAR TAG>)" actions="no" archive="yes"]]