Smarty Forum Index Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon.

{if} extension/idea

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> Feature Requests
View previous topic :: View next topic  
Author Message
arkin
Smarty n00b


Joined: 05 Dec 2006
Posts: 1

PostPosted: Tue Dec 05, 2006 11:22 pm    Post subject: {if} extension/idea Reply with quote

Not sure if this has been talked about, but i'd like an extension like this.
It encorporate empty.

{if $var e true}

aka

if (empty($var))
Back to top
View user's profile Send private message
boots
Administrator


Joined: 16 Apr 2003
Posts: 5611
Location: Toronto, Canada

PostPosted: Wed Dec 06, 2006 12:13 am    Post subject: Reply with quote

Why not just use {if empty($var)} ?
Back to top
View user's profile Send private message
mohrt
Administrator


Joined: 16 Apr 2003
Posts: 7368
Location: Lincoln Nebraska, USA

PostPosted: Wed Dec 06, 2006 3:26 pm    Post subject: Reply with quote

depending on your needs:

Code:
{if empty($var)}

{if !isset($var)}

{if $var eq ""}
Back to top
View user's profile Send private message Visit poster's website
messju
Administrator


Joined: 16 Apr 2003
Posts: 3336
Location: Oldenburg, Germany

PostPosted: Wed Dec 06, 2006 3:28 pm    Post subject: Reply with quote

or (also depending on your needs) just

Code:
{if !$var} ...
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> Feature Requests 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