Templates: Juneindex: 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

<juneindex:files>
<juneindex:if value="{juneindex:filenew value=‘true’ oldvalue=’‘}">
<juneindex:filelink /><br />
</juneindex:if>
</juneindex:files>

This example would display only the files that are new.

Changes

The equalto, lessthan, and greaterthan attributes were added in version 3.0 beta 2. The notqeualto attribute was added in version 3.1. Also as of Juneindex 3.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.2 beta 3.

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