This is the old documentation center for eZ Publish 4. We are currently migrating the eZ Publish documentation to http://confluence.ez.no the eZ Publish 5 documentation platform. Documentation for the eZ Publish legacy components are still located on this site, as well as all documentation for earlier releases.

is_set

Summary

Returns TRUE if the value of the provided variable is set.

Usage

is_set( target )

Parameters

NameTypeDescriptionRequired
target any The target variable. Yes.

Returns

TRUE or FALSE.

Description

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.

Examples

Example 1

{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.

Example 2

{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.".

Balazs Halasy (05/02/2004 1:35 pm)

Balazs Halasy (06/05/2005 9:28 am)


Comments

There are no comments.