private static ContentItem GetSelectedItem(SelectionUtility selection, ProfileUser profile) { var selectedItem = selection.ParseSelectionFromRequest(); if (selectedItem == null && profile.Settings.ContainsKey("Selected")) { selectedItem = selection.ParseSelected((string)profile.Settings["Selected"]); } return(selectedItem ?? (selection.Traverse.StartPage)); }
private IEnumerable <TreeNode> GetAncestors(HttpContextBase context) { var root = Selection.ParseSelected(context.Request["root"]) ?? Selection.Traverse.RootPage; return(Selection.Traverse.Ancestors(filter: engine.EditManager.GetEditorFilter(context.User), lastAncestor: root).Select(ci => engine.ResolveAdapter <NodeAdapter>(ci).GetTreeNode(ci)).ToList()); }