Skip to main content.
home | support | download

Back to List Archive

Re: [swish-e] Using more than one template

From: Kake Lol <kakelol(at)not-real.gmail.com>
Date: Sat Jun 16 2007 - 11:00:56 GMT
On 6/15/07, Bill Moseley <moseley@hank.org> wrote:
> 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?

Thanks for your reply. This is exactly what I want.

>
> > 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 )

<snip>

How do I fetch the template value? And do i still need 'file =>
'swish.tt',' in my config?

-- 
Kake Lol
_______________________________________________
Users mailing list
Users@lists.swish-e.org
http://lists.swish-e.org/listinfo/users
Received on Sat Jun 16 07:01:00 2007