- $template->param(searchform => qq{
-<form method="get" action="$IkiWiki::config{cgiurl}" id="searchform">
-<div>
-<input type="text" name="phrase" value="" size="16" />
-<input type="hidden" name="enc" value="UTF-8" />
-<input type="hidden" name="do" value="hyperestraier" />
-</div>
-</form>
-});
+ if ($template->query(name => "searchform")) {
+ if (! defined $form) {
+ my $searchform = template("searchform.tmpl", blind_cache => 1);
+ $searchform->param(searchaction => $config{cgiurl});
+ $form=$searchform->output;
+ }
+
+ $template->param(searchform => $form);
+ }