Hi,
I'm in the process of converting the Mega Menu to Razor templates, but I stumbled upon what looks like a bug.
While by default, when I loop through the nodes, the navigation doesn't renders the page where 'Hide in Menu' is selected, it doesn't do the same for when 'Show in Menu' isn't select in a product group.
See the video below:
https://www.screencast.com/t/kAMGolP8ir
The code I was using for that is:
var navigationSettings = new NavigationSettings() { StartLevel = 1, StopLevel = 5, ExpandMode = ExpandMode.All, Parameters = { {"id", "topnavigation"} } };
@helper RenderNavigationMenu(NavigationSettings navigationSettings) { <div class="grid__cell u-flex u-reset-position"> @RenderNavigationNodes2(GetNavigation(navigationSettings).Nodes, navigationSettings) </div> }
@helper RenderNavigationNodes(IEnumerable<NavigationTreeNodeViewModel> nodes, NavigationSettings navigationSettings = null) { <ul> @foreach (NavigationTreeNodeViewModel node in nodes) { <li>@node.Name</li> @RenderNavigationNodes2(node.Nodes) } </ul> }