Skip to main content.
home | support | download

Back to List Archive

Re: [swish-e] TemplateToolkit and Multiple Categories

From: Peter Karman <peter(at)not-real.peknet.com>
Date: Wed Apr 30 2008 - 01:14:53 GMT
Dan Lobo wrote on 4/29/08 11:00 AM:
> Just to let you guys know, that I have managed to incorporate my site theme and multiple categories in conjunction with the swish.tt template (TemplateToolkit), rather than using TemplateHTMLTemplate.
> 
> http://www.cot.org.uk/cgi-bin/swish4b.cgi
> 
> I guess I just need to figure out how to select all indexes to search as the default. At the moment it seems to be selecting the first one.
> 

No need to cc: me. I am subscribed to the list. :)

I think line 151 of the SWISH/TemplateToolkit.pm file is your clue. The @default 
array needs to contain all the indexes you want checked by default. A quick look 
at the code suggests it is looking for an ARRAY ref labeled 'default_index'. Is 
that what you are passing in your config?

Further, a look at the CGI.pm docs[1] gives confusing advice about whether the 
proper param key is 'defaults' or 'default'. It appears to be 'default' (as in 
TemplateToolkit.pm) though several examples use 'defaults'.


[1] 
http://search.cpan.org/~lds/CGI.pm-3.37/CGI.pm#CREATING_A_GROUP_OF_RELATED_CHECKBOXES
-- 
Peter Karman  .  http://peknet.com/  .  peter(at)not-real.peknet.com
_______________________________________________
Users mailing list
Users@lists.swish-e.org
http://lists.swish-e.org/listinfo/users
Received on Tue Apr 29 21:14:29 2008