Exemplo n.º 1
0
        /// <summary>
        /// Creates the collection for the main menu, adding the startpage
        /// </summary>
        private PageDataCollection LoadChildren(PageReference pageLink)
        {
            PageDataCollection pages = DataFactory.Instance.GetChildren(pageLink);

            pages.Insert(0, DataFactory.Instance.GetPage(pageLink));
            return(pages);
        }
Exemplo n.º 2
0
        /// <summary>
        /// Creates the pages hierarchy list.
        /// </summary>
        protected virtual void CreatePagesHierarchyList()
        {
            PageData page = GetPage(LowestPage);

            while (page != null)
            {
                _pagesList.Insert(0, page);
                page = GetParentPageData(page);
            }
        }
        private void AddParentIfRequired(PageData child, PageDataCollection items)
        {
            if (child.PageLink.CompareToIgnoreWorkID(SiteRoot))
                return;

            if (child.ParentLink.IsResolvable())
            {
                if (child.ParentLink.CompareToIgnoreWorkID(Settings.Instance.PageRootId.ToPageReference()))
                    return;

                items.Insert(0, child.ParentLink.ToPageData());

                AddParentIfRequired(child.ParentLink.ToPageData(), items);
            }
        }