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

null

Summary

Returns TRUE if the input value is NULL (not the same as 0).

Usage

input|null()

Returns

TRUE or FALSE.

Description

This operator returns TRUE if the input value is NULL, otherwise FALSE will be returned. Please note that NULL is not the same as a numeric zero (0).

Examples

Example 1

{if 0|null()}
    The truth is out there.
{else}
    The day the earth stood still.
{/if}

The following output will be produced: "The day the earth stood still".

Balazs Halasy (05/02/2004 10:43 am)

Balazs Halasy (04/05/2005 2:10 pm)


Comments

  • is_null( null() )

    As becomes clear when you read this page, is_null( null() ) will never work since null() and is_null() does the same, checks if input is null.
    In other words there are no way of setting a variable to NULL in templates, it has to come from php ( fetch function or template operator ).