isPropertyEmpty: Difference between revisions
Jump to navigation
Jump to search
Verisimilar (talk | contribs) (Applied Template:MacroFunction) |
|||
Line 1: | Line 1: | ||
= | {{MacroFunction | ||
|name=isPropertyEmpty | |||
|description= | |||
Returns 1 if the [[Token:token property|token property]] for the [[Token:Current Token|Current Token]] is empty. A [[Token:token property|token property]] is empty if it is null, if an empty string ("") has been assigned to it, it is not considered empty. | Returns 1 if the [[Token:token property|token property]] for the [[Token:Current Token|Current Token]] is empty. A [[Token:token property|token property]] is empty if it is null, if an empty string ("") has been assigned to it, it is not considered empty. | ||
|usage= | |||
<source lang="mtmacro" line> | <source lang="mtmacro" line> | ||
[h: empty = isPropertyEmpty("propertyName")] | [h: empty = isPropertyEmpty("propertyName")] | ||
</source> | </source> | ||
|example= | |||
<source lang="mtmacro" line> | <source lang="mtmacro" line> | ||
[r, if(isPropertyEmpty("propertyName")): propertyName = someDefaultValue] | [r, if(isPropertyEmpty("propertyName")): propertyName = someDefaultValue] | ||
</source> | </source> | ||
}} | |||
[[Category:Token Function]] |
Revision as of 21:03, 8 March 2009
isPropertyEmpty() Function
Returns 1 if the token property for the Current Token is empty. A token property is empty if it is null, if an empty string ("") has been assigned to it, it is not considered empty.
Usage
[h: empty = isPropertyEmpty("propertyName")]
Example
[r, if(isPropertyEmpty("propertyName")): propertyName = someDefaultValue]