3 package IkiWiki::Plugin::tag;
12 IkiWiki::hook(type => "preprocess", id => "tag",
13 call => \&preprocess);
14 IkiWiki::hook(type => "pagetemplate", id => "tag",
15 call => \&pagetemplate);
18 sub preprocess (@) { #{{{
23 my $page = $params{page};
27 foreach my $tag (keys %params) {
28 push @{$tags{$page}}, $tag;
30 push @{$IkiWiki::links{$page}}, $tag;
36 sub pagetemplate ($$) { #{{{
40 $template->param(tags => join(', ',
41 map { IkiWiki::htmllink($page, $page, $_) }
43 if exists $tags{$page} && $template->query(name => "tags");