Be.menus.actionMenu ViewHelper <f:be.menus.actionMenu>
ViewHelper which returns a select box that can be used to switch between multiple actions and controllers and looks similar to TYPO3s "funcMenu".
Note: This ViewHelper is experimental and tailored to be used only in extbase context.
Go to the source code of this ViewHelper: Be\Menus\ActionMenuViewHelper.php (GitHub).
Table of contents
Examples
Simple:
packages/my_extension/Resources/Private/Templates/Module/Index.fluid.html
<f:be.menus.actionMenu>
<f:be.menus.actionMenuItem label="Overview" controller="Blog" action="index" />
<f:be.menus.actionMenuItem label="Create new Blog" controller="Blog" action="new" />
<f:be.menus.actionMenuItem label="List Posts" controller="Post" action="index" arguments="{blog: blog}" />
</f:be.menus.actionMenu>
Copied!
Select box with the options "Overview", "Create new Blog" and "List Posts".
Localized:
packages/my_extension/Resources/Private/Templates/Module/Index.fluid.html
<f:be.menus.actionMenu>
<f:be.menus.actionMenuItem label="{f:translate(key:'overview')}" controller="Blog" action="index" />
<f:be.menus.actionMenuItem label="{f:translate(key:'create_blog')}" controller="Blog" action="new" />
</f:be.menus.actionMenu>
Copied!
Localized select box.
Arguments of the <f:be.menus.actionMenu> ViewHelper
Allows arbitrary arguments
This ViewHelper allows you to pass arbitrary arguments not defined below
directly to the HTML tag created. This includes custom data- arguments.
additionalAttributes
-
- Type
- array
Additional tag attributes. They will be added directly to the resulting HTML tag.
aria
-
- Type
- array
Additional aria-* attributes. They will each be added with a "aria-" prefix.
data
-
- Type
- array
Additional data-* attributes. They will each be added with a "data-" prefix.
defaultController
-
- Type
- string
The default controller to be used