Beispiel #1
0
        public List<Site> GetChildSites(string siteName)
        {
            var siteList = new List<Site>();
            var pageManager = PageManager.GetManager();
            var sites = new MultisiteManager();

            var allSites = sites.GetSites();

            foreach (var sitee in allSites)
            {
                var helper = new WidgetDesigners.WidgetDesignerHelper();
                var parentSite = helper.GetParentSite(pageManager, sitee.SiteMapRootNodeId);

                var parentSiteName = "";

                if (parentSite != null)
                    parentSiteName = parentSite.Name;

                if (parentSiteName == siteName)
                {
                    siteList.Add(sitee);
                }
            }

            return siteList;
        }
Beispiel #2
0
        public List <Site> GetChildSites(string siteName)
        {
            var siteList    = new List <Site>();
            var pageManager = PageManager.GetManager();
            var sites       = new MultisiteManager();

            var allSites = sites.GetSites();

            foreach (var sitee in allSites)
            {
                var helper     = new WidgetDesigners.WidgetDesignerHelper();
                var parentSite = helper.GetParentSite(pageManager, sitee.SiteMapRootNodeId);

                var parentSiteName = "";

                if (parentSite != null)
                {
                    parentSiteName = parentSite.Name;
                }

                if (parentSiteName == siteName)
                {
                    siteList.Add(sitee);
                }
            }

            return(siteList);
        }