]> sipb.mit.edu Git - ikiwiki.git/blobdiff - IkiWiki/Plugin/tag.pm
Hope encrico doesn't mind, but I changed the location and layout of the
[ikiwiki.git] / IkiWiki / Plugin / tag.pm
index a6eddb019a51606bd6d92fa2927b4a5861d1b3ae..c4e12e61dd01f4dc31d4777d00d78a63300f503b 100644 (file)
@@ -22,6 +22,7 @@ sub preprocess (@) { #{{{
        my %params=@_;
        my $page = $params{page};
        delete $params{page};
+       delete $params{destpage};
 
        $tags{$page} = [];
        foreach my $tag (keys %params) {
@@ -33,14 +34,16 @@ sub preprocess (@) { #{{{
        return "";
 } # }}}
 
-sub pagetemplate ($$) { #{{{
-       my $page=shift;
-       my $template=shift;
-
-       $template->param(tags => join(', ', 
-                       map { IkiWiki::htmllink($page, $page, $_) } 
-                               @{$tags{$page}}))
-               if exists $tags{$page} && $template->query(name => "tags");
+sub pagetemplate (@) { #{{{
+       my %params=@_;
+       my $page=$params{page};
+       my $destpage=$params{destpage};
+       my $template=$params{template};
+
+       $template->param(tags => [
+               map { link => IkiWiki::htmllink($page, $destpage, $_) }, 
+                       @{$tags{$page}}
+       ]) if exists $tags{$page} && @{$tags{$page}} && $template->query(name => "tags");
 } # }}}
 
 1