After upgrading this blog to Blojsom 3.1, I hooked up Pager Plugin‘s pager.vm velocity code to SkipFilterHelper Plugin, and the result is as you can see at the bottom of my blog when you’re not viewing this post via feed or permalink (e.g. try the blog home page).
There is a bug with SkipFilterHelper Plugin in Blojsom 3.1 (registered in JIRA as BLOJSOM-195, David checked in the fix to CVS), which is about incorrect total pages on boundary cases. I immediately noticed this error because it also exists in Pager Plugin 0.2 . The SkipFilterHelper Plugin fix will be included in Blojsom 3.2, and in the mean time you can either apply the fix yourself to Blojsom 3.1 and rebuild from source, or email me and I’ll send you the patched jar.
Here’s what you have to do to get the page by page view on Blojsom 3.1:
- Set up SkipFilterHelper Plugin.
- Download pager.vm and place it on WEB-INF/blogs/[your-blog]/templates/ directory.
- Include pager.vm from your blog’s theme template, e.g. add the code #parse( “pager.vm” ) to asual.vm .
In case of error, you can debug whether your SkipFilterHelper Plugin installation was successful or not by displaying the values of $BLOJSOM_TOTAL_PAGES and $BLOJSOM_CURRENT_PAGE.
Moving forward, it would be nice if the code in pager.vm can be included as a macro in Blojsom 3.2 onward so people don’t have to set up pager.vm manually. And perhaps SkipEntriesFilter should handle criterias, e.g. category, so that we can have page by page view within a category instead of the whole blog.
Update: (03-04-2007) this functionality has been included in Blojsom 3.2 (registered in JIRA as BLOJSOM-211).
Update: someone (I don’t know the person’s name) made a Japanese translation of Pager Plugin installation for Blojsom 2. That’s the first non-English documentation on something I made, yay.