We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 19388
    • 297 Posts
    Hello,
    I have an issue with ditto pagination and phx. I’ve read a lot of posts in the forum, wiki and ditto page that tells we must call ditto cached on an uncached page, and thats what i’m doing:

    [[Ditto? &id=`noticias` &parents=`5` &orderBy=`createdon DESC`  &summarize=`5` &display=`5` &paginate = `1` &paginateAlwaysShowLinks= `1` &tpl=`noticia` ]]
    
    <p>Mostrando <strong>[+noticias_start+]</strong> - <strong>[+noticias_stop+]</strong> de <strong>[+noticias_total+]</strong> noticias | Página <strong>[+noticias_currentPage+]</strong> de <strong>[+noticias_totalPages+]</strong> </p> <div id="ditto_pages"> [+noticias_previous+] [+noticias_pages+] [+noticias_next+] </div>


    The page is not marked as cacheable. But the fields start, stop, total, currentpage... appears to be empty.

    What could be the problem?

    If tried without the "id" parameter too.

    EDIT: It doesn’t work for me with PHx disabled, I think i’m doing something wrong...

    Thanks
      • 11316
      • 81 Posts
      Hopefully this is more helpful than confusing. Here is how I got the pagination to work.
      1. You must install the splitPagination Snippet: http://modxcms.com/extras.html?view=package/view&package=97
      2. After installing you must put this snippet call on the same page in your designated spot.

      My template call: [!Ditto? &parents=`63` &tpl=`tpl_ClientNews` &summarize=`4` &total=`50` &paginate=`1`!]<div class="splitPage"> [!splitPagination? &return=`1`!]</div>

      start simple or you might have already done these steps.
        • 19388
        • 297 Posts
        I don’t what what really happened but it start rewriting again my sentence from the most simply and adding by steps the parameters and testing and now it works. My actual working ditto sentence is:

        [[Ditto? &parents=`5` &paginate=`1` &paginateAlwaysShowLinks=`1` &phx=`1` &tpl=`noticia` &summarize=`3` ]]


        EDIT: Could be the "phx" parameter?

        Thanks
          • 19388
          • 297 Posts
            • 11316
            • 81 Posts
            I admit I have not tinkered with the phx yet, yet! However I completely agree with you on the starting on the simple call. I have worked myself in a frenzy at times and finally just started over on the ditto calling parameters one at a time to figure out where I went wrong. Glad you got it working. Ryan