How to show more than 30 categories in SharePoint blog/news sites?

SharePoint doesn't work as intended

Imagine this: you’re using a good old SharePoint blog site, and have a bunch of categories in use. That’s nice and easy – SharePoint offers the categorization functionality natively, and it works decently. Problems arise when you have a lot of categories, though – not all of them will be shown. Even if you tweak the web part to show more items on a page, this isn’t reflected on the whole blog site!

This post article explains how to fix this.

Problem

For background info – the category listing is actually an XSLT list view web part. It’s not obvious just looking at it, but to change its view you’ll need to modify the list view it’s attached to.

With low numbers of categories, this works quite nicely.

SharePoint blog

SharePoint blog with categories

By default, however, SharePoint only shows 30 first (alphabetically ordered) of your categories. Weirdly enough, it doesn’t show any paging for them – and it doesn’t even indicate in any way, that it’s not showing all of the categories! This is a bit annoying, so luckily there’s a way to change this.

Solution: Modify the view to show more categories on 4 different pages!

Changing the settings for the list viewer web part is simple enough. But first, you’ll need to create a new view that we’ll be using for this web part. To do that, you’ll need to open the “Categories” list for your blog web (it’s usually in an URL like “/Lists/Categories/AllCategories.aspx”). When there, just create a new view (you can base it on “All Categories” or create it from the scratch), set most of the settings to be whatever you want, but be mindful to set the “Item limit” to 99, and for the mobile view too! (see below)

Creating a new view for the XSLT webpart

Creating a new view for the XSLT web part – 99 is the max number of items!

Click “OK” to save it.

Great – now we’ve got the view, and we’ll just have to use it!

To achieve this, first, you’ll need to open the page in edit mode and edit the web part.

How to edit Categories -webpart

How to edit Categories -web part

Then, you’ll want to create a new view and set it as the default one for this web part. 

Edit the view settings for the webpart

Edit the view settings for the web part

Now, the trick is realizing you’ll actually have to do this for 4 different pages. The default.aspx (blog home page), Post.aspx (page for viewing posts by ID) and Category.aspx (page for filtering by category) and Date.aspx (page for filtering by month). That’s a lot of pages to edit, but at least it’s a simple change.

After editing those 4 pages, you should be good! 🙂

The following two tabs change content below.

Antti K. Koskela

Solutions Architect / Escalations Engineer at Koskila / Norppandalotti Software / Valo Solutions
Antti Koskela is a proud digital native nomadic millenial full stack developer (is that enough funny buzzwords? That's definitely enough funny buzzwords!), who works as a Solutions Architect for Valo Intranet, the product that will make you fall in love with your intranet. Working with the global partner network, he's responsible for the success of Valo deployments happening all around the world. He's been a developer from 2004 (starting with PHP and Java), and he's been bending and twisting SharePoint into different shapes since MOSS. Nowadays he's not only working on SharePoint, but also on .NET projects, Azure, Office 365 and a lot of other stuff.This is his personal professional (e.g. professional, but definitely personal) blog.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.