X-Git-Url: https://sipb.mit.edu/gitweb.cgi/ikiwiki.git/blobdiff_plain/20eacc2c1f74d0ab617dca36378a35920e313a23..8fd9c9accbc3c3e977aa78cb38bf7b264c53bace:/IkiWiki/Plugin/tag.pm diff --git a/IkiWiki/Plugin/tag.pm b/IkiWiki/Plugin/tag.pm index a6eddb019..c4e12e61d 100644 --- a/IkiWiki/Plugin/tag.pm +++ b/IkiWiki/Plugin/tag.pm @@ -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