Example #1
0
        public List <ContentCategory> GetSiteCategories(int takeTop, bool ShowNonZeroCountOnly)
        {
            List <ContentCategory> lstNav = new List <ContentCategory>();

            if (takeTop < 0)
            {
                takeTop = 100000;
            }
            using (ISiteNavHelper navHelper = SiteNavFactory.GetSiteNavHelper()) {
                lstNav = navHelper.GetCategoryList(this.TheSite.SiteID, takeTop);
            }

            lstNav.RemoveAll(x => x.Count < 1 && ShowNonZeroCountOnly);
            lstNav = lstNav.OrderByDescending(x => x.Count).ToList();

            return(lstNav);
        }