Thursday, July 05, 2007

Changing the Number Of Blog Posts Per Page


When I posted about how to Select Multiple Categories for SharePoint Blog Posts, one reader noted in the comments that when you view items by category, it only lists 10 posts per page. This reader wanted to know how to increase the number of posts that are shown on a particular page.

Unfortunately, there isn't a quick and easy way to do this just from within a web browser. Our faithful friend, SharePoint Designer 2007 will give us the tools we need to change this, however.

First, click on one of the categories to go to the page that displays the posts for that category. The page should be at /Lists/Categories/Category.aspx. Now open this page for editing in SharePoint Designer 2007.

Once the page is open, change to code view. Then look for a section of code that looks like the following screenshot:


(Note: this screenshot was taken with Word Wrap enabled.)

You are looking for the section that is highlighted in the above screenshot.

You will see several other RowLimit sections with other numbers in them. You want to make sure you have this one.

Change the number "10" to however many blog posts you want to display on a page.

Once you've made your change, save the page and view it.

If you want to display more posts on the home page of your blog, you can do this same thing by editing default.aspx.

7 comments:

KDReuther said...

Ricky,

Thank you for this information. Have you actually tested this edit? Is it the same as changing the Itemlimit in the "All Categories" view (in the web browser)? Changing the Itemlimit in this view totally breaks the List By Category functionality.

KDReuther said...

Ricky, this seems to work. Thank you so much. We were stuck with our 10 posts per category. Increasing the number from within the web browser did more damage than help. But this method really works.

Ricky Spears said...

kdreuther - Yes, I did test it. I'm glad it worked for you.

You may have noticed that the default limit for the "All Posts" view is 100. While this is the default view for viewing the Posts list, and it is an optional view that can be applied to the Posts web part on the Categories page, it is not the view that is applied by default to this web part on this page. As you've already discovered, if you apply another view, you will break the web part. You don't have access to edit these views outside of using SharePoint Designer.

KDReuther said...

Ricky,

One open issue remains: at the bottom of each posts by category view there is a little arrow to display the next set of posts per category. This functionlity does not work. All you get is "There are no posts in this category."

- Dieter

Ricky Spears said...

Dieter - I noticed that, but couldn't get it to work myself. It didn't work before making the change either, so I have to assume that it's a bug in SharePoint. It does work on the home page, but it doesn't work when you view them by category.

KDReuther said...

Ricky,

Yes, it is a bug. I was told Microsoft has no plans to fix this issue at this point.

- Dieter

Anonymous said...

great help article, but how do you get the categorys page fixed if you've already tried to set the item limit property? I changed it to 100 and I now can't see any posts on this page. I've gone into SP designer to change the rowlimit but my page is still broken.