hook(type => "preprocess", id => "tag", call => \&preprocess_tag, scan => 1);
hook(type => "preprocess", id => "taglink", call => \&preprocess_taglink, scan => 1);
hook(type => "pagetemplate", id => "tag", call => \&pagetemplate);
hook(type => "preprocess", id => "tag", call => \&preprocess_tag, scan => 1);
hook(type => "preprocess", id => "taglink", call => \&preprocess_taglink, scan => 1);
hook(type => "pagetemplate", id => "tag", call => \&pagetemplate);
eval q{use Getopt::Long};
error($@) if $@;
Getopt::Long::Configure('pass_through');
GetOptions("tagbase=s" => \$config{tagbase});
eval q{use Getopt::Long};
error($@) if $@;
Getopt::Long::Configure('pass_through');
GetOptions("tagbase=s" => \$config{tagbase});
-sub preprocess_tag (@) { #{{{
+ return htmllink($page, $destpage, tagpage($tag), %opts);
+}
+
+sub preprocess_tag (@) {
- return htmllink($params{page}, $params{destpage},
- tagpage($tag),
- linktext => IkiWiki::pagetitle($1));
+ add_link($params{page}, tagpage($tag));
+ return taglink($params{page}, $params{destpage}, $tag,
+ linktext => pagetitle($1));
- return htmllink($params{page}, $params{destpage},
- tagpage($tag));
+ add_link($params{page}, tagpage($tag));
+ return taglink($params{page}, $params{destpage}, $tag);
- link => htmllink($page, $destpage, tagpage($_),
- rel => "tag")
+ link => taglink($page, $destpage, $_, rel => "tag")
}, sort keys %{$tags{$page}}
]) if exists $tags{$page} && %{$tags{$page}} && $template->query(name => "tags");
}, sort keys %{$tags{$page}}
]) if exists $tags{$page} && %{$tags{$page}} && $template->query(name => "tags");