예제 #1
0
        public IEnumerable <IArchive> GetArchivesByCategoryPath(string catPath, bool includeChild, int number,
                                                                int skipSize)
        {
            var ic = _catRepo.GetCategoryByPath(SiteId, catPath);

            int[] catIdArray;
            if (includeChild)
            {
                catIdArray = GetCatArrayByPath(ic);
                if (catIdArray.Length == 0)
                {
                    return(new List <IArchive>());
                }
            }
            else
            {
                catIdArray = new[] { ic.GetDomainId() };
            }

            return(_archiveRep.GetArchivesContainChildCategories(SiteId, catIdArray, number, skipSize));
        }