ViewHelper Documentation
v:if.var.isset
Variable: Isset
Renders the then
child if the variable name given in
the name
argument exists in the template. The value
can be zero, NULL or an empty string - but the ViewHelper
will still return TRUE if the variable exists.
Combines well with dynamic variable names:
<!-- if {variableContainingVariableName} is "foo" this checks existence of {foo} -->
<v:if.var.isset name="{variableContainingVariableName}">...</v:if.var.isset>
<!-- if {suffix} is "Name" this checks existence of "variableName" -->
<v:if.var.isset name="variable{suffix}">...</v:if.var.isset>
<!-- outputs value of {foo} if {bar} is defined -->
{foo -> v:if.var.isset(name: bar)}
Arguments
then anySimpleType
Value to be returned if the condition if met.
else anySimpleType
Value to be returned if the condition if not met.
name string