variable.unset ViewHelper <vhs:variable.unset>
Variable: Unset
Quite simply, removes a currently available variable from the TemplateVariableContainer:
<!-- Data: {person: {name: 'Elvis', nick: 'King'}} -->
I'm {person.name}. Call me "{person.nick}". A ding-dang doo!
<v:variable.unset name="person" />
<f:if condition="{person}">
<f:else>
You saw this coming...
<em>Elvis has left the building</em>
</f:else>
</f:if>
Copied!
At the time of writing this, v:
is not able
to remove members of for example arrays:
<!-- DOES NOT WORK! -->
<v:variable.unset name="myObject.propertyName" />
Copied!
Arguments
name
- DataType
- string
- Required
- true
- Description
- Name of variable in variable container