You are here: Re: switch instruction in smarty? « Smarty Templates Posts « IT news, forums, messages
Re: switch instruction in smarty?

Posted by Pete Morgan on 10/21/05 16:58

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

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация