Page 1 of 1

Using get vairiable in url tomake a switch in template - SOLVED

Posted: Tue Mar 18, 2008 3:57 pm
by R0BINH00D
Can I have a link like this:

www.domain.com?page=thealias&colour=blue

then have some code in a template or global content block that does a switch like:

{if colour=='blue'}

do this

{else}

do that

{/if}

I'm not sure how to reference the variable in the template with the {if colour=='blue'} bit?

Any help appreciated - just point me in the right direction.

Thanks

Dan

Re: Using get vairiable in url tomake a switch in template

Posted: Tue Mar 18, 2008 4:21 pm
by calguy1000
{if $smarty.get.colour == 'blue'}

Re: Using get vairiable in url tomake a switch in template

Posted: Thu Apr 17, 2008 12:26 pm
by R0BINH00D
I forgot to say thanks for this!

Thanks!

Dan