Page / MenuViewHelper

Page: Menu ViewHelper

ViewHelper for rendering TYPO3 menus in Fluid

Supports both automatic, tag-based rendering (which
defaults to ul > li with options to set both the
parent and child tag names. When using manual rendering
a range of support CSS classes are available along
with each page record.

Optional divider to insert between each menu item. Note that this does not mix well with automatic rendering due to the use of an ul > li structure

string

doktypes

CSV list or array of allowed doktypes from constant names or integer values, i.e. 1,254 or DEFAULT,SYSFOLDER,SHORTCUT or just default,sysfolder,shortcut

mixed

entryLevel

Optional entryLevel TS equivalent of the menu

integer

excludePages

Page UIDs to exclude from the menu. Can be CSV, array or an object implementing Traversable.

mixed

excludeSubpageTypes

CSV list or array of doktypes to not consider as subpages. Can be constant names or integer values, i.e. 1,254 or DEFAULT,SYSFOLDER,SHORTCUT or just default,sysfolder,shortcut

mixed

expandAll

If TRUE and $levels > 1 then expands all (not just the active) menu items which have submenus

boolean

id

Unique (in this file) identifier for this HTML element.

string

includeAnchorTitle

If TRUE, includes the page title as title attribute on the anchor.

boolean

includeSpacers

Wether or not to include menu spacers in the page select query

boolean

lang

Language for this element. Use short names specified in RFC 1766

string

levels

Number of levels to render - setting this to a number higher than 1 (one) will expand menu items that are active, to a depth of $levels starting from $entryLevel

integer

linkActive

If FALSE, does not wrap with links the titles of pages that are active in the rootline

boolean

linkCurrent

If FALSE, does not wrap the current page in a link

boolean

onclick

JavaScript evaluated for the onclick event

string

pageUid

Optional parent page UID to use as top level of menu. If left out will be detected from rootLine using $entryLevel

integer

resolveExclude

Exclude link if realurl/cooluri flag txrealurlexclude is set

boolean

rootLineAs

If used, stores the menu root line as an array in a variable named according to this value and renders the tag content - which means automatic rendering is disabled if this attribute is used

string

showCurrent

If FALSE, does not display the current page

boolean

showHidden

DEPRECATED - IGNORED. FIELD IS AN ENABLE-FIELD WHICH MUST BE RESPECTED. Include disabled pages into the menu

boolean

showHiddenInMenu

Include pages that are set to be hidden in menus

boolean

style

Individual CSS styles for this element

string

substElementUid

Optional parameter for wrapping the link with the uid of the page

boolean

tabindex

Specifies the tab order of this element

integer

tagName

Tag name to use for enclsing container

string

tagNameChildren

Tag name to use for child nodes surrounding links. If set to "a" enables non-wrapping mode.

string

title

Tooltip text of element

string

titleFields

CSV list of fields to use as link label - default is "navtitle,title", change to for example "txmyextsomefield,subtitle,navtitle,title". The first field that contains text will be used. Field value resolved AFTER page field overlays.

string

useShortcutData

Shortcut to set useShortcutTarget and useShortcutData simultaneously

boolean

useShortcutTarget

Optional param for using shortcut target instead of shortcut itself for current link

boolean

useShortcutUid

If TRUE, substitutes the link UID of a shortcut with the target page UID (and thus avoiding redirects) but does not change other data - which is done by using useShortcutData.