diff options
author | joey <joey@0fa5a96a-9a0e-0410-b3b2-a0fd24251071> | 2007-02-14 04:05:08 +0000 |
---|---|---|
committer | joey <joey@0fa5a96a-9a0e-0410-b3b2-a0fd24251071> | 2007-02-14 04:05:08 +0000 |
commit | 96125d8da512d992012560a1115eb3a8115bafbe (patch) | |
tree | 8290149ed4e09f4d74b14ccb618348b80e32b73b /IkiWiki | |
parent | 663a87442788d2a5db38cf2f3056383e0915a4d7 (diff) |
* Allow multiple tag settings to appear in a single page.
Diffstat (limited to 'IkiWiki')
-rw-r--r-- | IkiWiki/Plugin/tag.pm | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/IkiWiki/Plugin/tag.pm b/IkiWiki/Plugin/tag.pm index 29d1d030a..b06eadd13 100644 --- a/IkiWiki/Plugin/tag.pm +++ b/IkiWiki/Plugin/tag.pm @@ -41,9 +41,8 @@ sub preprocess (@) { #{{{ delete $params{page}; delete $params{destpage}; - $tags{$page} = []; foreach my $tag (keys %params) { - push @{$tags{$page}}, $tag; + $tags{$page}{$tag}=1; # hidden WikiLink push @{$links{$page}}, tagpage($tag); } @@ -60,13 +59,14 @@ sub pagetemplate (@) { #{{{ $template->param(tags => [ map { link => htmllink($page, $destpage, tagpage($_)) - }, @{$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"); if ($template->query(name => "categories")) { # It's an rss/atom template. Add any categories. - if (exists $tags{$page} && @{$tags{$page}}) { - $template->param(categories => [map { category => $_ }, @{$tags{$page}}]); + if (exists $tags{$page} && %{$tags{$page}}) { + $template->param(categories => [map { category => $_ }, + sort keys %{$tags{$page}}]); } } } # }}} |