Ejemplo n.º 1
0
        public async Task <Frankindex> GetIndexForCategory(string categorySlug)
        {
            var items =
                from page in _pages.Values
                where page.Categories.Any(x => x.Slug == categorySlug)
                select new FrankindexItem(page.Slug, page.Title);

            var categoryDescription = await GetPageAsync("category-" + categorySlug);

            var index = new Frankindex(
                items.ToArray(),
                categorySlug,
                categorySlug.Humanize(LetterCasing.Title),
                categoryDescription != null
                    ? categoryDescription.Html
                    : string.Empty);

            return(index);
        }
Ejemplo n.º 2
0
        public async Task<Frankindex> GetIndexForCategory(string categorySlug)
        {
            var items =
                from page in _pages.Values
                where page.Categories.Any(x => x.Slug == categorySlug)
                select new FrankindexItem(page.Slug, page.Title);

            var categoryDescription = await GetPageAsync("category-" + categorySlug);

            var index = new Frankindex(
                items.ToArray(),
                categorySlug,
                categorySlug.Humanize(LetterCasing.Title),
                categoryDescription != null
                    ? categoryDescription.Html
                    : string.Empty);

            return index;
        }