X-Git-Url: http://git.vanrenterghem.biz/git.ikiwiki.info.git/blobdiff_plain/b2bd444f31fd9f294ee0dbc4b9a61b1e8c04055c..2e95062df8326a46d91112214a0a80886692b1a4:/IkiWiki/Render.pm?ds=sidebyside diff --git a/IkiWiki/Render.pm b/IkiWiki/Render.pm index 854d5105e..51e7a194f 100644 --- a/IkiWiki/Render.pm +++ b/IkiWiki/Render.pm @@ -8,8 +8,8 @@ use File::Spec; use IkiWiki; sub linkify ($$) { #{{{ - my $content=shift; my $page=shift; + my $content=shift; $content =~ s{(\\?)$config{wiki_link_regexp}}{ $2 ? ( $1 ? "[[$2|$3]]" : htmllink($page, titlepage($3), 0, 0, pagetitle($2))) @@ -152,8 +152,8 @@ sub globlist_merge ($$) { #{{{ } #}}} sub genpage ($$$) { #{{{ - my $content=shift; my $page=shift; + my $content=shift; my $mtime=shift; my $title=pagetitle(basename($page)); @@ -177,7 +177,12 @@ sub genpage ($$$) { #{{{ if ($config{discussion}) { $template->param(discussionlink => htmllink($page, "Discussion", 1, 1)); } - $template->param(headercontent => $config{headercontent}); + + if (exists $hooks{pagetemplate}) { + foreach my $id (keys %{$hooks{pagetemplate}}) { + $hooks{pagetemplate}{$id}{call}->($page, $template); + } + } $template->param( title => $title, @@ -213,8 +218,8 @@ sub mtime ($) { #{{{ } #}}} sub findlinks ($$) { #{{{ - my $content=shift; my $page=shift; + my $content=shift; my @links; while ($content =~ /(?