neos-bot / flow-development-collection

The unified repository containing the Flow core packages, used for Flow development.
https://flow.neos.io/
MIT License
0 stars 0 forks source link

Nested switch view helpers #17

Open neos-bot opened 9 years ago

neos-bot commented 9 years ago

Jira issue originally created by user witrin:

Nesting the f:switch view helper in the following way ends with an exception:

<f:switch expression="{expression}">
    <f:case value="matching">
        <f:render partial="Partial" arguments="{argument: argument}" />
    </f:case>
</f:switch>
<f:switch expression="{expression}">
    <f:case value="matching">
        Foo
    </f:case>
</f:switch>

The thrown exception is:

#1243352249: No value found for key "TYPO3\Fluid\ViewHelpers\SwitchViewHelper->break", thus the key cannot be removed.

Jira-URL: https://jira.neos.io/browse/FLOW-165

neos-bot commented 8 years ago

Comment created by @bwaidelich:

[~witrin] Thanks for reporting. Nested switch VHs in one template should work as expected. Making them work across templates/layouts/partials would be very hard to achieve as they all have their own context