On Fri, Jun 15, 2007 at 08:40:13AM +0200, Kake Lol wrote:
> Hi.
>
> I'm using swish.cgi, and I'm trying to use more than one template
> (multiple designs, one CGI).
>
> I'd like to send a "<input type="hidden" name="template" value="3">"
> from the search form.
So you want to have a swish.cgi?template=3 to select a given view
vs using different paths to the cgi script?
> I'm using this config:
>
> template => {
> package => 'SWISH::TemplateToolkit',
> file => 'swish.tt',
> options => {
> INCLUDE_PATH => '/var/www/',
WRAPPER => 'wrapper.tt',
> },
> },
>
> How can I change 'file' after which template sent in the search form?
If it's just the layout you want to be different you can use a wrapper
template to look at that query parameter and select which layout you
want.
layout = ( get the template value )
SWITCH layout;
CASE 1;
content WRAPPER layout_one.tt;
CASE 2;
content WRAPER layout_two.tt;
CASE; # default
content WRAPPER layout_three.tt;
END;
> _______________________________________________
> Users mailing list
> Users@lists.swish-e.org
> http://lists.swish-e.org/listinfo/users
>
--
Bill Moseley
moseley@hank.org
Unsubscribe from or help with the swish-e list:
http://swish-e.org/Discussion/
Help with Swish-e:
http://swish-e.org/current/docs
_______________________________________________
Users mailing list
Users@lists.swish-e.org
http://lists.swish-e.org/listinfo/users
Received on Fri Jun 15 10:01:58 2007