X-Git-Url: https://sipb.mit.edu/gitweb.cgi/ikiwiki.git/blobdiff_plain/54541869392f162bb195b8b67814ef0a394c1961..e49ff966a39d1037ccbf168b8dbd12618cf1b41e:/IkiWiki/Plugin/meta.pm diff --git a/IkiWiki/Plugin/meta.pm b/IkiWiki/Plugin/meta.pm index 41d096e0e..15a8bad84 100644 --- a/IkiWiki/Plugin/meta.pm +++ b/IkiWiki/Plugin/meta.pm @@ -26,6 +26,7 @@ sub preprocess (@) { #{{{ delete $params{$key}; my $page=$params{page}; delete $params{page}; + delete $params{destpage}; eval q{use CGI 'escapeHTML'}; @@ -52,12 +53,15 @@ sub preprocess (@) { #{{{ return ""; } # }}} -sub pagetemplate ($$) { #{{{ - my $page=shift; - my $template=shift; +sub pagetemplate (@) { #{{{ + my %params=@_; + my $page=$params{page}; + my $template=$params{template}; - $template->param(meta => $meta{$page}) if exists $meta{$page}; - $template->param(title => $title{$page}) if exists $title{$page}; + $template->param(meta => $meta{$page}) + if exists $meta{$page} && $template->query(name => "meta"); + $template->param(title => $title{$page}) + if exists $title{$page} && $template->query(name => "title"); } # }}} 1