November Happy Hour will be moved to Thursday December 5th.
November Happy Hour will be moved to Thursday December 5th.
There should be a checkbox on the page called "show in navigation" I beleve. This needs to be on for it to show in the menu
Yes, that field's name is Display in navigation. Is it checked in your case, Xrtquot?
Display in navigation is checked. The helper method (MenuList) has code below which does not return new page. I think the implementation of menulist is not the proper one for multi-level menu. Can anybody provide any simple implementation for multi-level menu? Thanks.
var menuItems = contentLoader.GetChildren<PageData>(rootLink) .FilterForDisplay(requirePageTemplate, requireVisibleInMenu) .Select(x => CreateMenuItem(x, currentContentLink, pagePath, contentLoader, filter)) .ToList();
GetChidren is only the parent level so would only be displaying items directly under the first level of the start page. E.g.
-Alloy Plan
-Alloy Track
-Alloy Meet
It's been a while since looking at Alloy but if the code is only one level so would be the markup as a multilevel would usually suggest a dropdown or megamenu design needed to handle sub pages of the primary navigation. The code can be adapted you've just got to take the menu items collection loaded in and load it's children as well but you'll need to write some this code with some classes to structure the viewmodels for output in to the front end.
Hi,
Instead of GetChildren use GetDescendents. If you want to list out all the pages under the current page
Ex
var repo = ServiceLocator.Current.GetInstance();
repo.GetDescendents(Model.CurrentPage.ContentLink).Where(p => repo.Get(p) is Education).Select(repo.Get)
Thanks
Ravindra
I'm a newbie and playing around with Alloy project. I have created a new page under existing Alloy Plan. But I could not see any change in main menu which is not the case when I add a new page under Start node.However I can navigate to the new page manually by entering url as ".../AlloyPlan/newpage". How do the things work?
My page hierarchy is as below.
Start
-Alloy Plan
--newpage
-Alloy Track
-Alloy Meet