Closed (fixed)
Project:
Clean Pagination
Version:
6.x-1.0-alpha3
Component:
Miscellaneous
Priority:
Normal
Category:
Task
Assigned:
Reporter:
Created:
28 Sep 2009 at 02:14 UTC
Updated:
8 Aug 2011 at 14:11 UTC
'*/2' may be identical to some existing URL, causing problems. For example, if one uses it on the default node page, with the default URL being 'node?page=2', the cleaned URL will be 'node/2'! If you add a 'page' there, making it 'node/page/2', the conflict can be avoided and the URL is clearer.
Comments
Comment #1
Michael Phipps commentedHere is some code changes that will achieve this. I use node/page-2 format because I think it is a bit cleaner. There's still an issue with the code below where if you have a node alias named node/page-2-is-the-greatest, then node?page=2 will be displayed, but at least it is a start.
First, a change to the hook_init()
and then a change to cleanpager_theme_pager_link() (which is around line 155 after you change the hook_init function!)
As I've already mentioned, there's still some issues in the way this code works. It could be cleaner, and possibly the "page-" could be made a customizable admin setting - but it is a starting point.
Comment #2
j_ten_man commentedI have implemented this functionality in the latest release: 6.x-1.0-alpha3
Note that the urls are created as page/2 and not page-2 as the above fix suggested (mainly because that is what the client requested). There is a setting on the settings page to turn this off and keep the old functionality.
Comment #3
j_ten_man commented