X-Git-Url: http://git.vanrenterghem.biz/git.ikiwiki.info.git/blobdiff_plain/8abe719f81a15a088e57f7f58e532d45863f59bb..24359d670d8572630f5a447b8f46e955c1fb3fa4:/IkiWiki/Plugin/search.pm diff --git a/IkiWiki/Plugin/search.pm b/IkiWiki/Plugin/search.pm index 751c75ab5..c8e0dd580 100644 --- a/IkiWiki/Plugin/search.pm +++ b/IkiWiki/Plugin/search.pm @@ -27,6 +27,7 @@ sub checkconfig () { #{{{ } } #}}} +my $form; sub pagetemplate (@) { #{{{ my %params=@_; my $page=$params{page}; @@ -34,15 +35,13 @@ sub pagetemplate (@) { #{{{ # Add search box to page header. if ($template->query(name => "searchform")) { - $template->param(searchform => qq{ -
-
- - - -
-
-}); + if (! defined $form) { + my $searchform = IkiWiki::template("searchform.tmpl", blind_cache => 1); + $searchform->param(searchaction => $IkiWiki::config{cgiurl}); + $form=$searchform->output; + } + + $template->param(searchform => $form); } } #}}}