For more information... RTFM!
NAVIGATION
PAGES THAT LINK HERE
ACCOUNT LOGIN

You are not logged in

Powered by Interchange version 5.7.0

either

Returns the first true value in a given list.

Summary

  • [either] This [or] That [or] The other [/either]

Parameter Description Default
hide

Suppress any output text that would ordinarily be returned from this tag.  (This universal parameter was introduced with Interchange version 5.5.2.)

No
reparse

Process any Interchange tags found in the text output from this tag.

No

Description

The [either] tag implements a check for the first true (non-blank, non-zero) value.  It splits on "[or]" and then, with each block found, it interpolates any ICML tags that are present and then strips any leading or trailing whitespace from the resulting value.  The first interpolated and stripped block found to have a true value (in the Perl sense) will be returned.

After a true value is found, any subsequent "[or]" blocks will be discarded without any further processing.

If none of the blocks are found to have a true value, then the interpolated and stripped value of the last block will be returned.

Behaviour change

Behaviour change

Prior to Interchange 5.0.0, if all of the split blocks were found to be false then this tag would return nothing at all.  In Interchange 5.0.0 and later, if all of the split blocks are found to be false then the return value will be the content of the last block (minus any leading and trailing whitespace).

Category:  Interchange tags
Last modified by: Kevin Walsh
Modification date: Sunday 11 March 2007 at 11:16 AM (CDT)
Home  |  Legal nonsense  |  Privacy policy  |  Donations  |  Contact us