Package

ViewHelpers

ViewHelper Documentation

v:case

Case for SwitchViewHelper

Used inside v:switch to trigger on specific values.

Example

<v:switch value="{variable}">
    <v:case case="someValue" break="TRUE">
        <!-- do whatever, if {variable} == 'someValue' -->
    </v:case>
    <v:case case="default">
        <!-- the case "default" is a reserved keyword which acts as the default case. -->
    </v:case>
</v:switch>

Arguments

case string, required

Value which triggers this case - reserved name "default" used for default case

break boolean, required

If TRUE, breaks switch on encountering this case

ViewHelper Resources

Schema Resources