paginationmodxdittomodx-templates

Pagination [+next+] not working on MODx CMS template


I'm having difficulty getting the pagination functionality working with [[Ditto? ... ]] in MODx CMS.

I have the documents displaying in the page, limit is set to 5. The output from my other pagination template placeholders seem to be working but the [+next+] link doesn't load the next set of 5 documents (going in descending date order).

Here's my template code:

[[Ditto?
    &parents=`13`
    &tpl=`ArticleListChunk`
    &display=`5`
    &&removeChunk=`Comments`
    &paginate=`1`
    &extenders=`summary,dateFilter`
    &paginateAlwaysShowLinks=`0`
    &dateFormat=`%F %D %Y`
]]

<p>Showing <strong>[+start+]</strong> - <strong>[+stop+]</strong> of <strong>[+total+]</strong> Articles</p>
<ul class="clearfix">
    <li>[+previous+]</li>
    <li>Page <strong>[+currentPage+]</strong> of [+totalPages+]</li>
    <li>[+next+]</li>
</ul>


The output I get is:

Showing 1 - 5 of 17 Articles

Page 1 of 4
Next >


as you can see the output is correct, however when I click the 'next' link the resulting URL is .../news.html?start=5 but the content of the page stays the same (i.e. the latest 5 documents are shown!).

This is how the template and functionality was when I was inherited this project from a client, and I have never used MODx CMS before -- can anyone help me please?

I there a way to update the SQL offset with a parameter or something? I've been all through the Wiki pages for Ditto / MODx but can't find what I need or what I should be doing that I'm not!


Solution

  • I would think you need to call ditto uncached [[!Ditto? attribs ]]

    That's just a guess.

    Also it looks like you are using EVO? check the cache syntax, you might need to put an exclamation mark at the end as well. [[!Ditto? attribs !]]