Dear Experts.
I have a document type called site settings in root node.
site settings has nested content with single multiurl picker and title and multiurl picker for child pages.
in my partial view i am able to access the node site settings and nested content properties which shows data i added.
when i try to access the properties i cant able to get the data.
@inherits UmbracoViewPage
@using Umbraco.Cms.Core.Models;
@using Umbraco.Cms.Web.Common.PublishedModels;
@using ContentModels = Umbraco.Cms.Web.Common.PublishedModels;
@{
var siteSettings = Umbraco.ContentAtRoot().FirstOrDefault(x => x.ContentType.Alias == "siteSettings");
var navigationItems = siteSettings.Value<IEnumerable<IPublishedElement>>("mainNavigation");
}
@if(navigationItems!=null && navigationItems.Any())
{
<ul class="nav nav-pills" id="mainNav">
@foreach(var item in navigationItems)
{
var hasChildLinks = item.ChildLinks;//unable to access childlinks property
}
</ul>
}
Navigation from site settings root node
Dear Experts. I have a document type called site settings in root node. site settings has nested content with single multiurl picker and title and multiurl picker for child pages. in my partial view i am able to access the node site settings and nested content properties which shows data i added. when i try to access the properties i cant able to get the data.
you need to do something like below
is working on a reply...