allow search form visibility to be controlled on the template
[ikiwiki.git] / IkiWiki.pm
index c428de77f7e055390e66fcdf53301f61ac2d9382..54271beccac03847003bc0ea2c92e90433238df7 100644 (file)
@@ -1742,21 +1742,28 @@ sub template ($;@) {
 
 sub misctemplate ($$;@) {
        my $title=shift;
-       my $pagebody=shift;
+       my $content=shift;
        
-       my $template=template("misc.tmpl");
+       my $template=template("misc.tmpl") || template("page.tmpl");
+
+       run_hooks(pagetemplate => sub {
+               shift->(page => "", destpage => "", template => $template);
+       });
+
        $template->param(
                title => $title,
-               indexlink => indexlink(),
                wikiname => $config{wikiname},
-               pagebody => $pagebody,
+               content => $content,
                baseurl => baseurl(),
                html5 => $config{html5},
+               have_actions => 0, # force off
+               parentlinks => [{  # override
+                       url => $config{url},
+                       page => $config{wikiname},
+               }],
                @_,
        );
-       run_hooks(pagetemplate => sub {
-               shift->(page => "", destpage => "", template => $template);
-       });
+
        return $template->output;
 }