Using an UrlRewriter in Umbraco to change the paging style.

Paging using XSLT is a very useful, and fairly simple (and well-documented here). It generates very SEO friendly links between pages, however, it can be used to generate even better links, with a little tweaking and use of the UrlRewriting.NET that comes with Umbraco. The XSLT examples are from the BlogListPosts.xslt in the Blog4Umbraco package.

Note: I'm using domain prefixes, and if you don't you might have to alter the syntax in some small way to get it working flawlessly for you.

1. Add an entry to the /config/UrlRewriting.config
Code Sample - UrlRewriting, Paging

2. Modify the XSLT so that it outputs a page reference, instead of a querystring.
Was:
Code Sample - UrlRewriting, Paging - Link w/ QueryString Change into:
Code Sample - UrlRewriting, Paging - Link w/ Page Reference

Note: If you're using directory URLs, you can skip the ".aspx" ending of the link, and just add a slash.

blog comments powered by Disqus