[SMARTY] Re: switch instruction in smarty?

Pete Morgan <[email protected]>
Newsgroups gmane.comp.php.smarty.general
Message-ID <[email protected]>
pbaker wrote:
> Hi,
> i have a problem with my templates.
> this is some template...
> 
> [code]
> 
> {assign var="foo" value=$smarty.get.bar}
> 
{if $foo eq "something"}
   <tr><td>show my webpage</td></tr>
{elseif $foo eq "somethingelse"}
   <tr><td>show another page</td></tr>
{else}
<tr><td>Default</td></tr>
{/if}

Have fun Enjoy smarty ;-)
pete

> 
> .....
> .....
> 
> [/code]
> 
> everything is ok when the foo variable eq the $smarty.get.bar
> 
> but i want to display the default value... !
> 
> i want to do in smarty something like switch instruction in php...
> 
> any suggestion?
> 
> 
> ps.: sorry 4 my english :P

-- 
Smarty General Mailing List (http://smarty.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.