Skip to main content.
home | support | download

Back to List Archive

RE: runs from command line, not from browser

From: Bill Moseley <moseley(at)>
Date: Mon Dec 02 2002 - 21:13:28 GMT
At 02:29 PM 12/02/02 -0600, Jody Cleveland wrote:
>I went ahead and installed the toolkit, and everything works fine now. I do
>have another question though. When I go to
> there's that chunk
>at the top with the search box, limit search to and sort by. Which file, and
>where do I modify that bit? I'd like to add a bit more spacing between the
>lines and fix my justification.

Oh, ya.  Yuck.  It's in the template:

    [% search.get_meta_name_limits %]

That calls the function get_meta_name_limits in the
modules/ file.  It's done that way to allow for the config
file to have some control and make it work with different template systems.
 Typically you would not need that function and just use the templae to
generate that form.

You can edit that module to change the look, but I'd recommend using the
template to change the look, instead.  I feel it's better to move as much
display code into the template as possible.

So in the template you can do:

        Limit to:
        [% CGI.radio_group( {
            name    => 'metaname',
            values  => search.config('metanames'),
            labels  => search.config('name_labels'),
            } ).join %]<br>

if you want to use to format the form.

Or you can just hand code the HTML:

        Limit search to:
<input type="radio" name="metaname" value="swishdefault" checked />Title
&amp; Body
<input type="radio" name="metaname" value="swishtitle" />Title
<input type="radio" name="metaname" value="swishdocpath" />Document Path

But than it won't remember which button was pressed before (e.g. which is
"checked").  You can do that with [% IF ...%] directives, but I think using is easier.

That can be fixed by running the form through HTML::FillInForm (as is done
with the HTML::Template version).

Bill Moseley
Received on Mon Dec 2 21:15:01 2002