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

For questions and problems with the CMS core. This board is NOT for any 3rd party modules, addons, PHP scripts or anything NOT distributed with the CMS made simple package itself.
Post Reply
R0BINH00D
Forum Members
Forum Members
Posts: 19
Joined: Wed Oct 24, 2007 4:32 pm

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

Post 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
Last edited by R0BINH00D on Thu Apr 17, 2008 12:26 pm, edited 1 time in total.
calguy1000
Support Guru
Support Guru
Posts: 8169
Joined: Tue Oct 19, 2004 6:44 pm
Location: Fernie British Columbia, Canada

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

Post by calguy1000 »

{if $smarty.get.colour == 'blue'}
Follow me on twitter
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
R0BINH00D
Forum Members
Forum Members
Posts: 19
Joined: Wed Oct 24, 2007 4:32 pm

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

Post by R0BINH00D »

I forgot to say thanks for this!

Thanks!

Dan
Post Reply

Return to “CMSMS Core”