The snippet for navigation in U8 is generated as followed
@inherits Umbraco.Web.Mvc.UmbracoViewPage
@using Umbraco.Web
@*
This snippet displays a list of links of the pages immediately under the top-most page in the content tree.
This is the home page for a standard website.
It also highlights the current active page/section in the navigation with the CSS class "current".
*@
@{ var selection = Model.Root().Children.Where(x => x.IsVisible()).ToArray(); }
@if (selection.Length > 0)
{
<ul>
@foreach (var item in selection)
{
<li class="@(item.IsAncestorOrSelf(Model.Content) ? "current" : null)">
<a href="@item.Url">@item.Name</a>
</li>
}
</ul>
}
Here seems to be a bug. In Umbraco 8 the RenderModel has been removed, so it is no longer Model.Content just Model.
Bug in partial view snippet for navigation
The snippet for navigation in U8 is generated as followed
Here seems to be a bug. In Umbraco 8 the RenderModel has been removed, so it is no longer Model.Content just Model.
Therefore correct should be
Am I right?
Hi Christian
Yes, Model is the equivalent of Model.Content fro v7s UmbracoTemplatePage :)
is working on a reply...