-# Forces a partial url (path only) to absolute, using the same
-# URL scheme as the CGI. Full URLs are left unchanged.
-sub absurl ($$) {
- my $partialurl=shift;
- my $q=shift;
-
- eval q{use URI};
- return URI->new_abs($partialurl, $q);
+ my $page="";
+ if (exists $params{page}) {
+ $page=delete $params{page};
+ $params{forcebaseurl}=urlabs(urlto($page), $topurl);
+ }
+ run_hooks(pagetemplate => sub {
+ shift->(
+ page => $page,
+ destpage => $page,
+ template => $template,
+ );
+ });
+ templateactions($template, "");
+
+ $template->param(
+ dynamic => 1,
+ title => $title,
+ wikiname => $config{wikiname},
+ content => $content,
+ baseurl => urlabs(baseurl(), $topurl),
+ html5 => $config{html5},
+ %params,
+ );
+
+ return $template->output;