Hi,
I am trying to render my main navigation on the frontend, I have my code in a partial and can get the links that are under the "Home" node.
I need to get any child pages of the child page under the home node.
I have this so far;
`@inherits Umbraco.Web.Mvc.UmbracoViewPage
@{
var selection = Umbraco.ContentAtRoot().FirstOrDefault()
.Descendants()
.Where(x => x.IsVisible());
}
<!-- NAVIGATION -->
<a class="menuopen"></a>
<nav>
<ul id="menu-main-menu" class="menu">
@foreach (var item in selection)
{
<li>
<a href="@item.Url" title="@item.Name">@item.Name</a>
</li>
}
</ul>
`</nav>
<a class="button" href="https://portal.principle-networks.com/" target="_blank" rel="nofollow noreferrer"><span>Portal Login</span></a>``
My content node structure looks like this https://prnt.sc/0um2Pv97wvHM
I've changed the children method to descendants and that's just listing ALL links as a long list.
This is what I am trying to achieve with the menu: https://prnt.sc/xwtL7-3r5k2R