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.

lt

Summary

Returns TRUE if a parameter is less than another parameter.

Usage

input|lt( value1 [, value2 ] )

Parameters

NameTypeDescriptionRequired
value1 any A variable/value that should be compared. Yes.
value2 any Another variable/value that should be compared. Only if the input parameter is omitted.

Returns

TRUE or FALSE (see below).

Description

This operator compares two parameters. It returns TRUE if the first parameter is less than the second parameter; otherwise FALSE will be returned. If the input parameter is provided, the operator will compare it with the first parameter; otherwise it is the first and the second parameter that will be compared. The following table shows how the different types are treated.

Type

Value

Number

The value of the number is used.

String

The number of characters is used.

Boolean

FALSE means 0 and TRUE means 1.

Array

The number of elements is used.

Object

The number of object attributes is used.

Other

Always 0.

Examples

Example 1

{256|lt( 128 )}

or

{lt( 256, 128 )}

Returns FALSE.

Example 2

{128|lt( 256 )}

or

{lt( 128, 256 )}

Returns TRUE.

Example 3

{256|lt( 256 )}

or

{lt( 256, 256 )}

Returns FALSE.

Example 4

{128|lt( 256, 64 )}

Returns TRUE.

Balazs Halasy (05/02/2004 11:42 am)

Balazs Halasy (04/05/2005 4:09 pm)


Comments

There are no comments.