- # The base url needs to be a full URL, and urlto may return a path.
- my $baseurl = absurl(urlto($params{page}), $cgi->url);
-
- showform($form, $buttons, $session, $cgi, @_,
- forcebaseurl => $baseurl);
-}
-
-# 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}=urlto($page);
+ }
+ run_hooks(pagetemplate => sub {
+ shift->(
+ page => $page,
+ destpage => $page,
+ template => $template,
+ );
+ });
+ templateactions($template, "");
+
+ my $baseurl = baseurl();
+
+ $template->param(
+ dynamic => 1,
+ title => $title,
+ wikiname => $config{wikiname},
+ content => $content,
+ baseurl => $baseurl,
+ html5 => $config{html5},
+ %params,
+ );
+
+ return $template->output;