Project

General

Profile

Actions

Bug #87179

closed

ActionMenuItemGroupViewHelper can not have f:for as child

Added by Kevin Ditscheid almost 6 years ago. Updated over 4 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
-
Target version:
-
Start date:
2018-12-17
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
9
PHP Version:
7.2
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

I tried to procedurally generate items inside the ActionMenuItemGroupViewHelper by using something like this:

<f:be.menus.actionMenu>
    <f:for each="{extensions}" as="template" key="extensionKey">
        <f:be.menus.actionMenuItemGroup label="{extensionKey}">
            <f:for each="{template}" as="currentTemplate" key="templateKey">
                <f:be.menus.actionMenuItem
                    controller="MyController" 
                    action="Index" 
                    arguments="{selectedTemplate: currentTemplate, selectedExtension: extensionKey}" 
                    label="{templateKey}" />
            </f:for>
        </f:be.menus.actionMenuItemGroup>
    </f:for>
</f:be.menus.actionMenu>

The ActionMenuItemGroupViewHelper is checking the class name of its child nodes and refuses to render the for-loop, because it is the child node and not of the ActionMenuItemViewHelper class.
I think it is totally viable to have this kind of structure to generate an actionMenu with option groups, though.

Actions #1

Updated by Gerrit Code Review over 4 years ago

  • Status changed from New to Under Review

Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/63927

Actions #2

Updated by Gerrit Code Review over 4 years ago

Patch set 1 for branch 9.5 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/63901

Actions #3

Updated by Susanne Moog over 4 years ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100
Actions #4

Updated by Benni Mack over 4 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF