|
Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon. |
|
View previous topic :: View next topic |
Author |
Message |
vain Smarty Rookie
Joined: 20 May 2006 Posts: 23 Location: Berlin / Germany
|
Posted: Sun Aug 03, 2008 8:53 pm Post subject: Missing closing bracket@if function@example 7-16 |
|
|
http://www.smarty.net/manual/en/language.function.if.php
Quote: |
Example 7-16. {if} with more examples
{if isset($name) && $name == 'Blog'}
{* do something *}
{elseif $name == $foo}
{* do something *}
{/if}
{if isset($foo) && is_array($foo) && count($foo) > 0)}
{* do a foreach loop *}
{/if}
|
Maybe this could be added as another example:
Quote: |
{if isset($article_comments) && is_array($article_comments) && count($article_comments) > 0}
Comments
{elseif isset($news_comments)}
1 Comment
{else}
No Comments.
{/if}
|
Thanks & best regards, vain |
|
Back to top |
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|