Templates: Junecode: if

This documentation was updated on Wednesday, September 30, 2009 at 10:53 PM

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.
mobile: true or false. Displays the contents if the visitor’s browser is or is not a mobile browser.
iphone: true or false. Displays the contents if the visitor’s browser is or is not an iPhone or iPod touch.

Example

<junecode:if value="">
<junecode:entrydate />
</junecode:if>

This example would display the date only for events.

Changes

The equalto, lessthan, and greaterthan attributes were added in version 2.0 beta 2. The notequalto attribute was added in version 2.1. Also as of Junecode 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. The mobile and iphone attributes were added in Junecode 3.0 beta 3.

You are here: Junecode: about: design templates: junecode: if
This site was created with Junecode. Copyright © 2010–2023 Junecloud LLC.