Tense Log: Templates: if
Inserts its contents if its value satisfies the equation.
Attributes
value: the value to compare. If no other attributes are given and it is equal to true, the contents are returned.
equalto: if the value is equal to this, the contents are returned.
notequalto: if the value is not equal to this, the contents are returned.
lessthan: if the value is less than this, the contents are returned.
greaterthan: if the value is greater than this, the contents are returned.
Example
<tenselog:if value="{tenselog:entryenddate}">
<tenselog:entrydate />
</tenselog:if>
This example would display the date only for events.
Changes
The equalto, lessthan, and greaterthan attributes were added in Tense Log 2.0 beta 2. The notequalto attribute was added in Tense Log 2.1. Also as of Tense Log 2.1, you can do multiple comparisons in a single if tag. If any one of them is true, the contents will be returned. Note that each attribute can only be used once, however.
Last updated April 09th, 2007
Can't find what you're looking for? View a complete site map.