Hi,
I’d like to render my menu twice within a template. Since I only want to chance some css classes I tried to copy the menu:
TypoScript
page = TYPO3.Neos:Page {
body {
parts {
menus {
mainMenuStatic = TYPO3.Neos:Menu {
templatePath = 'resource://Vendor.Site/Private/Templates/TypoScriptObjects/MainMenu.html'
// menu items as itemCollection
itemCollection = ${q(site).children('[instanceof TYPO3.Neos:Document]').get()}
attributes {
class = 'ui inverted menu'
id = 'mainMenuStatic'
}
current.attributes.class = 'active'
normal.attributes.class >
}
mainMenuSticky < mainMenuStatic
mainMenuSticky.attributes {
class = 'ui top fixed menu transition hidden'
id = 'mainMenuSticky'
}
}
}
}
Page Template
{namespace neos=TYPO3\Neos\ViewHelpers}
{namespace ts=TYPO3\TypoScript\ViewHelpers}
{namespace media=TYPO3\Media\ViewHelpers}
{parts.menus.mainMenuSticky -> f:format.raw()}
[…] some HTML […]
{parts.menus.mainMenuStatic -> f:format.raw()}
The problem is that the parts.menus.mainMenuStatic node gets rendered, the parts.menus.mainMenuSticky not. (And it really doesn’t get rendered and isn’t just invisible because of the css )
What is wrong?