Hi,
OK. I have a section in my site named "news", with numerous "news articles". My layout is such that I have a left side subnavigation listing the news articles, 5 at a time and I have managed to get pagination working, to a certain extent. The right side displays the pagetitle and content
My problem is this: if I am on page one of the pagination, and I click a link, the proper content is shown. If I then go to the "next" page in the left side paginated list of links, while I can click a link and the correct content shows, the pagination returns to page 1 to 5
To try to remedy this
So - in the Chunk that displays a single list item, I have used
<a href="/[~[+id+]~]?news_start=[+news_currentPage+]" style="white-space:normal; " >[+pagetitle+]</a><br /><br />
Which does work on the forward movement (Next >>) but breaks the back movement (<< Previous) in that when returning to what should be the first page, the "previous" link links to a page with news_start=1. This in turn prevents the first record from being shown.
I am not sure if this is at all clear. Let me try again.
News articles are page A.html, B.html, C.html etc. There should be 5 articles listed per "page" of pagination
Initially, links to pages A, B, C, D, and E are shown, correctly. Clicking any one of them shows the page, and the pagination list of links is recreated with links to A, B, C, D and E
I click "Next" and the list shows "F,G,H,I,J"
I click, say "F" and the content for "F" is shown, but the pagination menu returns to A,B,C,D,E
With the modification shown above, I have a new set of problems!
I go to the news section and get A,B,C,D,E in the paginated list. Clicking ’next’, then ’F’ gets me the correct page, and the correctly listed pagination.
However, clicking "back" then lists the first results, but offset by 1 as news_currentPage=1 - and so the pagination shows ’B,C,D,E,F’
I am probably missing someting obvious - or tackling this in the wrong way, but my google skills have not found me a simple tutorial- all I have come across require more experience with MODx than I have (eg,
http://ditto.modxcms.com/tutorials/pagination.html is not at all clear)