ModuleLayout.menuItem ViewHelper <be:moduleLayout.menuItem>
¶
Note
This ViewHelper is not available by default.
Import its namespace
{namespace be=TYPO3\CMS\Backend\ViewHelpers\}
in the Fluid file or
xmlns:be="http://typo3.org/ns/TYPO3/CMS/Backend/ViewHelpers/"
in the opening HTML tag.
A ViewHelper for adding a menu item to a doc header menu. It must be a child of <be:moduleLayout.menu>.
Examples¶
Default:
<be:moduleLayout>
<be:moduleLayout.menu identifier="MenuIdentifier">
<be:moduleLayout.menuItem label="Menu item 1" uri="{f:uri.action(action: 'index')}"/>
</be:moduleLayout.menu>
</be:moduleLayout>
Copied!
Source code¶
Go to the source code of this ViewHelper: MenuItemViewHelper.php (GitHub).
Arguments¶
The following arguments are available for <be:moduleLayout.menuItem>
:
-
label
¶ -
- Type
- string
- Required
true
Label of the menu item
-
uri
¶ -
- Type
- string
- Required
true
Action uri