예제 #1
0
        private void AddRootToPrimaryMenu(NavigationItems navItems)
        {
            if (!IncludeInNavigation(NavigationRoot))
                return;

            var navigationItem = CreateNavigationItem(NavigationRoot, 0, 0);
            //Root navigation item is only active when we are actually on the root item
            navigationItem.IsActive = ContextItem.ID == NavigationRoot.ID;
            navItems?.Items?.Insert(0, navigationItem);
        }
예제 #2
0
        public NavigationItems GetBreadcrumb()
        {
            var items = new NavigationItems
            {
                Items = GetNavigationHierarchy().Reverse().ToList()
            };

            for (var i = 0; i < items.Items.Count - 1; i++)
                items.Items[i].Level = i;

            return items;
        }