I’ve created an extension (but hesitate to call it such, since it is only really a few small modifications of CListView and its associated Javascript file, which is why I’m putting it here rather than upload it as a proper extension), to allow browser history while navigating the pages of a ListView using Ajax.
This is handy for user navigation, but also for things like users copying and pasting links to their friends (using this system their friends should see what they saw using that link, rather than automatically the first page of the ListView that they were on).
All you need to do to use it is download it and put it in your extensions directory (there is a text file included with instructions), then use it instead of the CListView widget and everything should be taken care of automatically.
I’ve changed as little as possible in both the CListView class and the jquery.yiilistview.js file. So in CListView I have overridden only the init (which still calls the parent init method) and registerClientScript methods. And in jquery.yiilistview.js, I have simply changed the initial configuration of the object, and used the hashchange event to initiate Ajax loads, with the pager buttons simply changing the hash - the Ajax load itself has not been changed at all. Hopefully this should maintain as much compatibility as possible, although I have not tested any Ajax sorting etc to see if it is affected.
Please feel free to let me know about any problems or changes that should be made.
I Uploaded the wrong (dev) version of the files please do not use them.