When editing a page, show that page's sidebar. (Thanks, privat)
[ikiwiki.git] / IkiWiki.pm
index 27fa4ca17dd3a17fa6768acb5e496758a3eb55a7..d2ed999239b16a36de61bfcff65f892bb8bbd642 100644 (file)
@@ -1739,11 +1739,20 @@ sub template ($;@) {
 sub misctemplate ($$;@) {
        my $title=shift;
        my $content=shift;
+       my %params=@_;
        
        my $template=template("page.tmpl");
 
+       my $page="";
+       if (exists $params{page}) {
+               $page=delete $params{page};
+       }
        run_hooks(pagetemplate => sub {
-               shift->(page => "", destpage => "", template => $template);
+               shift->(
+                       page => $page,
+                       destpage => $page,
+                       template => $template,
+               );
        });
        templateactions($template, "");
 
@@ -1754,7 +1763,7 @@ sub misctemplate ($$;@) {
                content => $content,
                baseurl => baseurl(),
                html5 => $config{html5},
-               @_,
+               %params,
        );
        
        return $template->output;