Example #1
0
        private List<NavigationLink> GetDropdown(int nodeid)
        {
            HierarchicalContent parent = WAFContext.Session.GetContent<HierarchicalContent>(nodeid);
            List<NavigationLink> links = new List<NavigationLink>();

            foreach (HierarchicalContent hc in parent.Children.Query().Where(AqlHierarchicalContent.ShowInMenu == true).Execute())
            {
                NavigationLink link = new NavigationLink();
                link.Text = hc.Name;
                link.Url = WAFContext.GetUrl(hc.NodeId);
                //link.RouteValues = new System.Web.Routing.RouteValueDictionary(new { controller = "WishList", action = "Index" });
                link.IsSelected = false;
                links.Add(link);
            }
            return links;
        }
Example #2
0
        public ViewResult DisplayMenu()
        {
            HierarchicalContent parent = WAFContext.Session.GetContent<HierarchicalContent>(26);
            List<NavigationLink> links = new List<NavigationLink>();

            foreach(HierarchicalContent hc in parent.Children.Query().Where(AqlHierarchicalContent.ShowInMenu == true).Execute())
            {
                NavigationLink link = new NavigationLink();
                link.Text = hc.Name;
                link.Url = WAFContext.GetUrl(hc.NodeId);
                if (hc is ArticleMG)
                {
                    ArticleMG art = (ArticleMG)hc;
                    link.CssIcon = art.CSSIcon;
                }
                link.IsSelected = false;
                links.Add(link);
            }
            return View(links);
        }