is_set( target )
| Name | Type | Description | Required |
|---|---|---|---|
| target | any | The target variable. | Yes. |
This operator checks if the value of the target parameter is a non-false value (meaning that it is set). If it is, the operator will return TRUE, otherwise FALSE will be returned. Please note that this operator does not take an input parameter.
{if is_set( $whatever )} It is set. {else} It is not set. {/if}
The following output will be produced: "It is not set." - because $whatever is not declared and/or defined.
{def $whatever='We need more rocket fuel!'} {if is_set( $whatever )} It is set. {else} It is not set. {/if}
The following output will be produced: "It is set.".
This document is based on eZ Publish Documentation. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License.