public ActionResult Index() { // 首页频道,去掉 "首页" 的菜单组。 var menus = _menuService.GetMenus(this.GetUser()).Where(entry => entry.Id != "Home"); var zones = _homeZoneService.GetArrangedZones("Home", ZoneColumns); var vm = new HomeViewModel(menus, zones.Select(z => new HomeZoneViewModel(z, _translation.T(z.Metadata.Name)))); return View(vm); }
public ActionResult Channel(string id) { if (id == "Home") { return RedirectToAction("Index"); } var menus = _menuService.GetMenuById(id,this.GetUser()); //_menuService.GetSubMenus(id, this.GetUser()); var zones = _homeZoneService.GetArrangedZones(id, ZoneColumns); var vm = new HomeViewModel(new List<MenuEntry>() { menus }, zones.Select(z => new HomeZoneViewModel(z, _translation.T(z.Metadata.Name)))); return View(vm); }