'current' Class missing for menu

Have created a menu in my footer content collection via neos backend. The “current” class in my footer menu didn’t appear when visiting (for example) the Impressum page. I have only added ´renderHiddenInIndex = 1´ to my custom ´TYPO3.Neos.NodeTypes:Menu´ prototype.

My custom Menu.ts2

    renderHiddenInIndex = 1

Rendered html:

<nav class=" typo3-neos-nodetypes-menu">
        <li class="normal">
            <a href="/impressum.html">Impressum</a> <!-- this is the current page but the wrong class appear on parent li -->
        <li class="normal">
		<a href="/datenschutz.html">Datenschutz</a>
        <li class="normal">
		<a href="/kontakt.html">Kontakt</a>


  • My main navigations works without problems
  • when adding current.attributes.class = ‘current’ to my Manu.ts2 file the “current” class appears but not on the correct li after visiting another link

Did i forget something?


Hi, did you use the item.state in fluid?

< f:for each="{items}" as=“item”>
< li{ts:render(path:’{item.state}.attributes’, context: {item: item}) -> f:format.raw()}>


Nope, used this one: https://github.com/neos/Neos.Demo/blob/master/Resources/Private/Templates/TypoScriptObjects/MainMenu.html

The problem is that only the first element does not get the current class if you click on in. Every other page in metamenu get the current class.

Change the typoscript part in Root.ts2:


startingPoint = ${q(site).children(‘metamenu’).get(0)}


startingPoint = ${q(site).children(’[uriPathSegment=“metamenu”]’).get(0)}

should solve the problem

1 Like