+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, tagpage($_))
+ }, @{$tags{$page}}
+ ]) if exists $tags{$page} && @{$tags{$page}} && $template->query(name => "tags");