first_set( value1 [, value2 [, ... ] ] )
Name | Type | Description | Required |
---|---|---|---|
value1 | any | A variable/value that should be evaluated. | Yes. |
value2 | any | Another variable/value that should be evaluated. | No. |
This operator evaluates all parameters until one of them is found to be set. The parameter that is found to be set will be returned. If none of the parameters are set, the operator will return FALSE.
{if first_set( $a, $b, $c )} The truth is out there. {else} The day the earth stood still. {/if}
As long as $a, $b and $c are undeclared/unset, the following output will be produced: "The day the earth stood still".
{first_set( $a, 256, $b )}
As long as $a is undeclared/unset, the following output will be produced: "256".
Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2013 eZ Systems AS (except where otherwise noted). All rights reserved.