]> git.vanrenterghem.biz Git - git.ikiwiki.info.git/blobdiff - IkiWiki/Plugin/search.pm
- Adds a tag plugin that allows more easily tagging pages.
[git.ikiwiki.info.git] / IkiWiki / Plugin / search.pm
index c94974ac4b608bfbf122f4455a0fe3fc0fcc71a6..8931e3fd4119edf69d859f70b829807c78269ff5 100644 (file)
@@ -32,7 +32,8 @@ sub pagetemplate ($$) { #{{{
        my $template=shift;
 
        # Add search box to page header.
-       $template->param(searchform => qq{
+       if ($template->query(name => "searchform")) {
+               $template->param(searchform => qq{
 <form method="get" action="$IkiWiki::config{cgiurl}" id="searchform">
 <div>
 <input type="text" name="phrase" value="" size="16" />
@@ -41,6 +42,7 @@ sub pagetemplate ($$) { #{{{
 </div>
 </form>
 });
+       }
 } #}}}
 
 sub delete (@) { #{{{
@@ -87,9 +89,7 @@ sub estcfg () { #{{{
        close TEMPLATE;
        open(TEMPLATE, ">$estdir/$cgi.conf") ||
                error("write $estdir/$cgi.conf: $!");
-       my $template=HTML::Template->new(
-               filename => "$config{templatedir}/estseek.conf"
-       );
+       my $template=template("estseek.conf");
        eval q{use Cwd 'abs_path'};
        $template->param(
                index => $estdir,