Forum Moderators: phranque
After struggling all day on a function to create
Prev 1 2 3 Nextlinks that actually work I've hit a small dilemma:
I'd like to give users the ability to choose how many items they view per page. This means that totalpages/userlimit which gives the amount of pages may be differnent for each user.
The way I do it the url looks like:
somesite.com/prds/34/4
34 = the id of the 'set of prds
4 = the page number
Spot the problem?
If people want to link to specific pages I'll have lots of broken links as users can choose how many items are viewed per page and thus affect the amount of pages per section.
So, the easy way is to fix the limit but, I'd really like to give control to the user whilst not shooting myself in the foot.
I've thought of a few ways around it but they all have flaws. Any ideas guys?
Many thanks...
Nick
Make it default to a value that works for your page indexing, and allow the user to upate the session variable with a new value.
<added>
Another way would be to change the
4 = the page number
to
4= item number that is first on page
The same as google does with start=10,20 etc
</added>