Smarty Forum Index Smarty
The discussions here are for Smarty, a template engine for the PHP programming language.
Missing closing bracket@if function@example 7-16

 
Post new topic   Reply to topic    Smarty Forum Index -> Documentation
View previous topic :: View next topic  
Author Message
vain
Smarty Rookie


Joined: 20 May 2006
Posts: 23
Location: Berlin / Germany

PostPosted: Sun Aug 03, 2008 8:53 pm    Post subject: Missing closing bracket@if function@example 7-16 Reply with quote

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
_________________
http://clansuite.com - just an eSport CMS. Based on PHP 5, Doctrine 2, Smarty 3, Ajax. - Easy, comfortable, fast, flexible.
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    Smarty Forum Index -> Documentation All times are GMT
Page 1 of 1

 
Jump to:  
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
Protected by Anti-Spam ACP