diff options
author | joey <joey@0fa5a96a-9a0e-0410-b3b2-a0fd24251071> | 2006-07-27 23:41:58 +0000 |
---|---|---|
committer | joey <joey@0fa5a96a-9a0e-0410-b3b2-a0fd24251071> | 2006-07-27 23:41:58 +0000 |
commit | dea23a1031b55dbc408e9f99c761fd667331cccd (patch) | |
tree | d4f036e9c2ef355693503a0f7ea84158ae549f2b /IkiWiki/Plugin/tag.pm | |
parent | 8d2c59804253ae513dda89cc6b733478c4c86fb6 (diff) |
* Switch pagetemplate hooks to using named parameters.
* Pass a "destpage" parameter to preprocessor and pagetemplate hooks.
This will be the page that a source page will be part of, which is
different than the source page for inlined pages.
* Audited all plugins to endure they pass page, destpage to htmllink
appropriatly. This means inlining of various plugins will not work
properly, with correct links generated.
Diffstat (limited to 'IkiWiki/Plugin/tag.pm')
-rw-r--r-- | IkiWiki/Plugin/tag.pm | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/IkiWiki/Plugin/tag.pm b/IkiWiki/Plugin/tag.pm index a6eddb019..f1f3b77f5 100644 --- a/IkiWiki/Plugin/tag.pm +++ b/IkiWiki/Plugin/tag.pm @@ -33,12 +33,14 @@ sub preprocess (@) { #{{{ return ""; } # }}} -sub pagetemplate ($$) { #{{{ - my $page=shift; - my $template=shift; +sub pagetemplate (@) { #{{{ + my %params=@_; + my $page=$params{page}; + my $destpage=$params{destpage}; + my $template=$params{template}; $template->param(tags => join(', ', - map { IkiWiki::htmllink($page, $page, $_) } + map { IkiWiki::htmllink($page, $destpage, $_) } @{$tags{$page}})) if exists $tags{$page} && $template->query(name => "tags"); } # }}} |