Skip to main content.
home | support | download

Back to List Archive

Re: [swish-e] TemplateToolkit and Multiple Categories

From: Dan Lobo <dan.lobo(at)>
Date: Wed Apr 30 2008 - 11:08:27 GMT
Thanks Peter, 


This is what I came up with, and remarkably, it seems to work!

To select all options by default, add the following line to your config:

        default_index => ['your.index'],

So in the context of your config file you should heave something like this:

return {
       swish_index      => [ '/home/','/home/','/home/','/home/' ],
select_indexes  => {
        method  => 'checkbox_group',
        labels  => [ 'Forum', 'Members', 'Public', 'Specialist' ],  # Must match up one-to-one to swish_index
        description => 'Select: ',
        default_index => ['/home/', '/home/','/home/','/home/'],

Please note, if you would like to index more than one file by default, you should add them in an array like format, as shown above.

This also seems to get rid of the index.swish-e not found error.

Hope this if of help to someone else.

Only problem that I can see is that not all the labels are ticked, despite the fact that they are selected as defaults??

Many kind regards, 

Dan Lobo

- ---------------------------------------------------------------

This e-mail transmission, including any attachments, is strictly confidential and intended solely for the addressee. It may contain private and confidential information and, if you are not the intended recipient, any review, retransmission or other use of, or taking any action in reliance upon, this information is prohibited.
The views expressed in this e-mail are those of the originator and not necessarily the views of BAOT / COT
If you have received this e-mail in error, please contact the sender and delete the material from any computer.
BAOT / COT has taken steps to ensure that this e-mail and attachments are free from any virus. In keeping with good computing practice, the recipient should carry out their own virus checks.
Please note that this e-mail has been created in the knowledge that internet e-mail is not a 100% secure communication medium. We advise that you understand this lack of security and take any necessary measures when e-mailing us.
BAOT / COT reserves the right to read any e-mail or attachment entering or leaving its systems from any source without prior notice.


BAOT:   The British Association of Occupational Therapists Limited is a company limited by guarantee and registered in England (Company number 392350).

COT:   The College of Occupational Therapists Limited is a company limited by shares and registered in England (Company number 1347374). The College is also a registered charity in England and Wales (Charity number 275119).

The registered office of both BAOT and COT is 106-114 Borough High Street, Southwark, London, SE1 1LB.

- ---------------------------------------------------------------
Users mailing list
Received on Wed Apr 30 07:06:43 2008