Attention
TYPO3 v11 has reached end-of-life as of October 31th 2024 and is no longer being maintained. Use the version switcher on the top left of this page to select documentation for a supported version of TYPO3.
Need more time before upgrading? You can purchase Extended Long Term Support (ELTS) for TYPO3 v11 here: TYPO3 ELTS.
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!
Examples
Simple:
<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>
Selectbox with the options "Overview", "Create new Blog" and "List Posts".
Localized:
<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>
Localized selectbox.
Source code
Go to the source code of this ViewHelper: ActionMenuViewHelper.php (GitHub).
Arguments
The following arguments are available for <f:
:
Name | Type | Default |
---|---|---|
mixed | ||
mixed | ||
mixed | ||
string |
additionalAttributes
-
- Type
- mixed
Additional tag attributes. They will be added directly to the resulting HTML tag.
data
-
- Type
- mixed
Additional data-* attributes. They will each be added with a "data-" prefix.
aria
-
- Type
- mixed
Additional aria-* attributes. They will each be added with a "aria-" prefix.
defaultController
-
- Type
- string
The default controller to be used