Hello together,
i want to render a menu and i’m having the following tree inside Neos 8.3.3:
By using afx, i’m having the following code that renders some levels, but only until the level of Projects:
prototype(Vendor.Neos:Header.MenuFlyout) < prototype(Neos.Fusion:Component) {
menuItems = Neos.Neos:MenuItems
renderer = afx`
<Neos.Fusion:Loop items={props.menuItems} itemName="item" iterationName="iterator">
<h3>{item.label}</h3>
<ul>
<li>
<a href={"/" + item.node.properties.uriPathSegment}>
<span>{item.node.properties.title}</span>
</a>
</li>
<Neos.Fusion:Loop items={item.subItems} itemName="subItem">
<li>
<a href={"/" + item.node.properties.uriPathSegment + "/" + subItem.node.properties.uriPathSegment}>
<span>{subItem.node.properties.title}</span>
</a>
</li>
</Neos.Fusion:Loop>
</ul>
</Neos.Fusion:Loop>
`
}
(I removed lots of css classes, lines and javascript to make it more easy to read, i hope it wasn’t to much)
As you might see inside the code, it only renders until Projects (and all other items of level 2) as i’m fetching subItems from item. How can i also access the items and their properties inside subItems (Projects)?
I thought about changing into something like that:
<Neos.Fusion:Loop items={item.subItems} itemName="subItem">
<b> {subItem.node.properties.title} </b> <-- Working
<!-- this part is new -->
<Neos.Fusion:Loop items={subItem.subItems} itemName="subItemItem">
<b> {subItemItem.node.properties.title} </b>
</Neos.Fusion:Loop>
<!-- end of new part -->
</Neos.Fusion:Loop>
But of course my attempt didnt’t work
Do you know how and where i can look to get more details and knowledge about this? Or maybe a direct solution whould be amazing.
Thank you!