Neos-Menu Reference?

probably I’m looking at the wrong place / documentation.

I was looking for a solution to add a class in the template-file to each Neos-menu-Item if it has children. Is there a Reference for the Menu properties on a particular place?

I found the «.subItems» –> but only by accident and with a long walk-around-search with terms like hasChild, hasChildren, children, countChildren, …
There were matches for FlowQuery and EEL, but not for Fluid.

In the Search-results for «subItems» under, there is no list or Reference about all properties, only a example with specific properties e.g. subItems. Maybe there are a lot more, which I could use next time for other needs.

Hi @mad!
what you could do is to override the templatePath and override the menu rendering to you needs:

prototype(TYPO3.Neos:Menu) {
	templatePath = 'resource://Vendor.Package/Private/Templates/TypoScriptObjects/Menu.html'

The orignal template looks like this

So you could check for {item. subItems} and do the stuff you want to

Hi Johannes,
excuse the ambiguous wording.
I had already overridden the Menu and it works fine. But your way is maybe the better. I have overridden the «» path in the file Root.ts2.
So, I realize every day new opportunities… I have change it as you had suggested. So, all other Menus has the same prototype-behavior.

But to be honest, I’am still looking for a Reference for Neos objects such as Menu, so next time I do not have to dig around everywhere. Maybe someone could show me the right place


Thank you Johannes!
Unfortunately I can’t find «item.subItems». Probably I do not know enough about the contexts. But I would like to lern more about.
Is this maybe a construct-mix: ts2 combined with Eel or Fluid?
Did someone know, what other Elements/Paths/Properties there are in the Menu- and item-element? Maybe I could use it next time for different porpose. Is somewhere a List about?

Or is this a Class property/method? That I could only find, with look trough the SourceCode?
Which Class/File would it be?

  • I found MenuHelper.php but there «items» is missing.
  • In MenuViewHelper.php there is an «items» part, but the class seems to assign (path-> /Packages/Application/TYPO3.Twitter.Bootstrap/Classes/TYPO3/Twitter/Bootstrap/ViewHelpers/Navigation/) to Twitter’s Bootstrap…
    And I can’t figure out from where the array $items will delivered.

If, its only findable by SorceCode-look-trough, where could I find the right Class and the Supplier?
The matches for «Menu» in the IDE are confusing a lot.

1 Like

Hey @mad,

in general there is a PHP class behind the prototypes. For Menu it is the MenuImplementation.php.
The items and subItems are build here
Check also the AbstractMenuImplementation.php

You can check the TS2-prototype for the class. There is a @class Annotation.

Check the docs at to get more knowledge about that topic

Hey stolle,
once again: Thanks!