Start page / Template development / Template syntax / Functions / in instructions / isSet

isSet(...)Available from FirstSpirit Version 4.0

The isSet(...) function can be used to check whether an object is available in the current context. This is useful if an object is context-dependent, e.g. the system object #cs .

The syntax of the isSet(...) function is as follows:

$CMS_IF(isSet(OBJECT))$
VALUE
$CMS_END_IF$
Important The isSet(...) function can only be applied to an object and not to an expression.

Examples

Check whether the system object #cs is available:

$CMS_IF(isSet(#cs))$
The system object #cs is available.
$CMS_ELSE$
The system object #cs is not available.
$CMS_END_IF$

Check whether the variable sizeConstant is available in the context:

$CMS_IF(isSet(sizeConstant))$
The Variable sizeConstant is available in the context.
$CMS_END_IF$

© 2005 - 2024 Crownpeak Technology GmbH | All rights reserved. | FirstSpirit 2024.7 | Data privacy