Package

ViewHelpers

ViewHelper Documentation

v:page.menu.directory

Page: Directory Menu ViewHelper

ViewHelper for rendering TYPO3 list 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.

Arguments

additionalAttributes anySimpleType

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

data anySimpleType

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

class string

CSS class(es) for this element

dir string

Text direction for this HTML element. Allowed strings: "ltr" (left to right), "rtl" (right to left)

id string

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

lang string

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

style string

Individual CSS styles for this element

title string

Tooltip text of element

accesskey string

Keyboard shortcut to access this element

tabindex integer

Specifies the tab order of this element

onclick string

JavaScript evaluated for the onclick event

forceClosingTag boolean

If TRUE, forces the created tag to use a closing tag. If FALSE, allows self-closing tags.

hideIfEmpty boolean

Hide the tag completely if there is no tag content

contenteditable string

Specifies whether the contents of the element are editable.

contextmenu string

The value of the id attribute on the menu with which to associate the element as a context menu.

draggable string

Specifies whether the element is draggable.

dropzone string

Specifies what types of content can be dropped on the element, and instructs the UA about which actions to take with content when it is dropped on the element.

translate string

Specifies whether an elements attribute values and contents of its children are to be translated when the page is localized, or whether to leave them unchanged.

spellcheck string

Specifies whether the element represents an element whose contents are subject to spell checking and grammar checking.

hidden string

Specifies that the element represents an element that is not yet, or is no longer, relevant.

tagName string

Tag name to use for enclsing container

tagNameChildren string

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

entryLevel integer

Optional entryLevel TS equivalent of the menu

levels integer

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

divider string

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

expandAll boolean

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

classActive string

Optional class name to add to active links

classCurrent string

Optional class name to add to current link

classHasSubpages string

Optional class name to add to links which have subpages

useShortcutUid boolean

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.

useShortcutTarget boolean

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

useShortcutData boolean

Shortcut to set useShortcutTarget and useShortcutData simultaneously

classFirst string

Optional class name for the first menu elment

classLast string

Optional class name for the last menu elment

substElementUid boolean

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

includeSpacers boolean

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

resolveExclude boolean

Exclude link if realurl/cooluri flag tx_realurl_exclude is set

showHidden boolean

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

showHiddenInMenu boolean

Include pages that are set to be hidden in menus

showCurrent boolean

If FALSE, does not display the current page

linkCurrent boolean

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

linkActive boolean

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

titleFields string

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

doktypes anySimpleType

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

excludeSubpageTypes anySimpleType

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

deferred boolean

If TRUE, does not output the tag content UNLESS a v:page.menu.deferred child ViewHelper is both used and triggered. This allows you to create advanced conditions while still using automatic rendering

as string

If used, stores the menu pages as an array in a variable named after this value and renders the tag content. If the tag content is empty automatic rendering is triggered.

rootLineAs string

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

excludePages anySimpleType

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

includeAnchorTitle boolean

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

forceAbsoluteUrl boolean

If TRUE, the menu will be rendered with absolute URLs

pages anySimpleType

Parent page UIDs of subpages to include in the menu. Can be CSV, array or an object implementing Traversable.

ViewHelper Resources

Schema Resources