Be.menus.actionMenuItem ViewHelper <f:be.menus.actionMenuItem>

ViewHelper which returns an option tag. This ViewHelper only works in conjunction with \TYPO3\CMS\Fluid\ViewHelpers\Be\Menus\ActionMenuViewHelper .

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>
Copied!

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>
Copied!

Localized selectbox.

Source code

Go to the source code of this ViewHelper: ActionMenuItemViewHelper.php (GitHub).

Arguments

The following arguments are available for <f:be.menus.actionMenuItem>:

Name Type Default
mixed
mixed
mixed
string
string
string
mixed array ()

additionalAttributes

additionalAttributes
Type
mixed

Additional tag attributes. They will be added directly to the resulting HTML tag.

data

data
Type
mixed

Additional data-* attributes. They will each be added with a "data-" prefix.

aria

aria
Type
mixed

Additional aria-* attributes. They will each be added with a "aria-" prefix.

label

label
Type
string
Required

true

Label of the option tag

controller

controller
Type
string
Required

true

Controller to be associated with this ActionMenuItem

action

action
Type
string
Required

true

The action to be associated with this ActionMenuItem

arguments

arguments
Type
mixed
Default
array ()

Additional controller arguments to be passed to the action when this ActionMenuItem is selected