Esempio n. 1
0
        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));
        }
Esempio n. 2
0
        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());
        }