Caution: This documentation is for eZ Publish legacy, from version 3.x to 5.x.
For 5.x documentation covering Platform see eZ Documentation Center, for difference between legacy and Platform see 5.x Architecture overview.

is_unset

Summary

Returns TRUE if the provided variable is not set (has no value).

Usage

is_unset( target )

Parameters

NameTypeDescriptionRequired
test any The target variable. Yes.

Returns

TRUE or FALSE.

Description

This operator checks if the target variable is set (has a value). If it is, the operator returns FALSE, otherwise TRUE will be returned.

Examples

Example 1

{def $my_variable=true()}
{if is_unset( $my_variable )}
    Yes.
{else}
    No.
{/if}

The following output will be produced: "No.".

Example 2

{def $my_variable=false()}
{is_unset( $my_variable )}
    Yes.
{else}
    No.
{/if}

The following output will be produced: "Yes.".

Balazs Halasy (05/02/2004 12:36 pm)

Balazs Halasy (06/05/2005 7:29 am)


Comments

  • Error Probably in Example 2

    {def $my_variable=false()}
    {if is_unset( $my_variable )}
    Yes.
    {else}
    No.
    {/if}