X-Git-Url: https://sipb.mit.edu/gitweb.cgi/ikiwiki.git/blobdiff_plain/8ff761afa24febdb280c672b3b31d6145990f050..5a4c95cc352d6895c11542245981c62a5c003370:/IkiWiki.pm diff --git a/IkiWiki.pm b/IkiWiki.pm index 33e4e1d1f..46c29abe3 100644 --- a/IkiWiki.pm +++ b/IkiWiki.pm @@ -1748,7 +1748,6 @@ sub misctemplate ($$;@) { $template->param( dynamic => 1, - have_actions => 0, # force off title => $title, wikiname => $config{wikiname}, content => $content, @@ -1756,6 +1755,16 @@ sub misctemplate ($$;@) { html5 => $config{html5}, @_, ); + + my @actions; + run_hooks(pageactions => sub { + push @actions, map { { action => $_ } } + grep { defined } shift->(page => ""); + }); + $template->param(actions => \@actions); + if (@actions) { + $template->param(have_actions => 1); + } return $template->output; }