public static IntranetMaster Map(IPublishedContent content, IntranetMaster model) { // Reference to the root (frontpage) node IPublishedContent rootNode = content.AncestorOrSelf(1); //Reference to the level 2 node IPublishedContent level2Node = content.AncestorOrSelf(2); // Get main navigation //model.MainNavigation = NavigationMapper.GetMainNavigation(rootNode, content); // Get top navigation //model.TopNavigation = NavigationMapper.GetTopNavigation(rootNode, content); model.LeftNavigation = NavigationMapper.GetIntranetMainNavigation(level2Node, content); model.MetaDescription = content.GetProperty("metaDescription") != null ? content.GetPropertyValue<string>("metaDescription") : string.Empty; model.MetaKeywords = content.GetProperty("metaKeywords") != null ? content.GetPropertyValue<string>("metaKeywords") : string.Empty; model.RedirectUrl = content.GetProperty("redirectURL") != null ? content.GetPropertyValue<string>("redirectURL") : string.Empty; model.BodyCssClass = level2Node != null ? level2Node.GetPropertyValue<string>("cssClassName") : string.Empty; model.SiteName = rootNode.GetProperty("siteName") != null ? rootNode.GetPropertyValue<string>("siteName") : string.Empty; model.SiteDescription = rootNode.GetProperty("siteDescription") != null ? rootNode.GetPropertyValue<string>("siteDescription") : string.Empty; model.Name = content.Name; return model; }
protected ViewResult View(string view, IntranetMaster model) { return base.View(view, IntranetMasterMapper.Map(CurrentPage, model)); }
protected ViewResult View(IntranetMaster model) { return View(null, model); }