Skip to main content.
home | support | download

Back to List Archive

Re: search.cgi updates

From: Jonas Wolf <JOWOLF(at)not-real.uk.ibm.com>
Date: Thu Jun 03 2004 - 10:14:35 GMT
> 1) Should I pull out the template from the __DATA__ section and place
> the template in a separate file -- or possibly a few template files so a
> site's layout/design can be more easily included?  If the script runs
> under SpeedyCGI or mod_perl then the template needs be in a separate
> file.

I think placing it in an external file makes more sense in many ways, as
you say, several different styles could be adopted and swapped more 
easily.
Although, of course, if you separate the content from the presentation
completely by using stylesheets and all that, then you readlly only need
one template ;) No but serious, the first thing I did was to take the 
template
out.

> 2) The script doesn't include many features like being able to limit
> searches by meta names or select sort order.  Are those features common
> enough that they should be included?  I don't want it to be a drop-in
> replacement for swish.cgi -- it's suppose to be just a skeleton used as
> a starting point for programmers -- but I can see providing a few extra
> features might be nice.
> 
> Should those changes be included?  Namely better highlight support
> and metaname selection?

I think highlight support is important enough, and sort order would be
desirable. As for meta names, I have to translate my search syntax to the
swish-e search syntax anyway, so that is not important for me. I 
definitely
think the search script is a nicer starting point as it is much easier to
understand (I had a look at swish.cgi and decided to go with the "simple"
script).

> 3) swish.cgi has two example templates (for use with HTML::Template and
> Template-Toolkit).  One is named swish.tmpl (for HTML::Template) but the
> other is named search.tt (for Template-Toolkit).  That's unfortunate
> naming since it would seem like search.tt would work with search.cgi,
> which it doesn't.
> 
> So, see any reason why search.tt shouldn't be renamed to swish.tt?

Yeah, renaming is a good idea. Got me confused as well.

Thanks,

Jonas
Received on Thu Jun 3 03:14:36 2004