Problems linking to 'next' page
2 posts by 2 authors in: Forums > CMS Builder
Last Post: February 18, 2009 (RSS)
By JeffC - February 18, 2009
On my home page I have 3 areas that lead to 3 detail pages. In each case I have set things up so that 5 items are listed on the page with a 'next' and 'previous' link to the other entries.
However, when the user clicks on the next link in one of the divs the page updates to the next link in all 3 areas.
Visit brixhamcc.co.uk to see what I mean:
Under 'Download the latest sermon' click on on the next link. This div is updated correctly with the next items. However, the news section and diary date section also get updated.
How can I stop this from happening?
Thanks
However, when the user clicks on the next link in one of the divs the page updates to the next link in all 3 areas.
Visit brixhamcc.co.uk to see what I mean:
Under 'Download the latest sermon' click on on the next link. This div is updated correctly with the next items. However, the news section and diary date section also get updated.
How can I stop this from happening?
Thanks
Jeff
Re: [Jeffie] Problems linking to 'next' page
By Dave - February 18, 2009
Hi Jeffie,
The way the viewers work is they look for the page number in the url but since you have multiple viewers they're all picking up the same page number.
Generally the way you'd do that is to link each of those sections to a dedicated list page for each: dates, sermons, etc. And only show the latest 3 or so on the front page.
So for sermons, you might have the latest 5 and then a link to "More Sermons..." that went to sermonsList.php where the user could page through the rest.
To force a particular viewer to always show page 1 you can add this option:
'pageNum' => 1,
or just remove perPage and pageNum and use limit to just get the latest 5:
'limit' => 5,
Hope that helps!
The way the viewers work is they look for the page number in the url but since you have multiple viewers they're all picking up the same page number.
Generally the way you'd do that is to link each of those sections to a dedicated list page for each: dates, sermons, etc. And only show the latest 3 or so on the front page.
So for sermons, you might have the latest 5 and then a link to "More Sermons..." that went to sermonsList.php where the user could page through the rest.
To force a particular viewer to always show page 1 you can add this option:
'pageNum' => 1,
or just remove perPage and pageNum and use limit to just get the latest 5:
'limit' => 5,
Hope that helps!
Dave Edis - Senior Developer
interactivetools.com
interactivetools.com