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.

not

Summary

Returns the opposite of the input or the first parameter (TRUE/FALSE).

Usage

input|not( test )

Parameters

NameTypeDescriptionRequired
test any The variable/value that should be tested. No.

Returns

TRUE or FALSE

Description

This operator returns TRUE if the input value is FALSE and vice versa. It is also possible to use the optional "test" parameter for evaluation. If both the input parameter and the "test" parameter are used, it is the input parameter that will be evaluated.

Examples

Example 1

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

The following output will be produced: "The truth is out there.".

Example 2

{if true()|not()}
    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.".

Example 3

{if not( false() )}
    The truth is out there.
{else}
    The day the earth stood still.
{/if}

The following output will be produced: "The truth is out there.".

Example 4

{if not( true() )}
    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

There are no comments.