We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 4310
    • 2,310 Posts
    Yes, try :
    [!Ditto? &parents=`2` &paginate=`1` &paginateAlwaysShowLinks=`1` &display=`4` &tpl=`BlogPageTemplate` &dateFormat=`%d %b %Y` &commentsChunk=``!]
    <p>Showing <strong>[+start+]</strong> - <strong>[+stop+]</strong> of <strong>[+total+]</strong> Results | Page <strong>[+currentPage+]</strong> of <strong>[+totalPages+]</strong> </p> <div id="ditto_pages"> [+previous+] [+pages+] [+next+] </div>  
    

    on your page to replace your existing snippet call.
    EDIT noticed some single quotes instead of backticks in the example I gave, now corrected
      • 29676
      • 45 Posts
      aaggh! Not working, doesn’t seem to do anything?

      If you want to log in (if that’s easier) email me at [email protected] for user name / password.
        • 15871
        • 105 Posts
        Uuugh. OK so I’ve implemented Ditto MANY times and pagination MANY times as well. I’ve done the caching trick and have gotten it to work successfully with PHx. However, on this latest site it just will NOT work. Here’s my call:

        <div class="newspage">
        [[Ditto? &parents=`122` &tpl=`news-list-item` &sortDir=`DESC` &sortBy=`eventDate` &noResults=`news-list-noresults` &pagination=`1` &paginateAlwaysShowLinks=`1` &summarize=`6`]]
        </div>
        <p>Showing <strong>[+start+]</strong> - <strong>[+stop+]</strong> of <strong>[+total+]</strong> Articles | Page <strong>[+currentPage+]</strong> of <strong>[+totalPages+]</strong></p>
        <div id="ditto_pages"> [+previous+] [+pages+] [+next+] </div>
        


        None of the placeholders display, here’s the page link: http://axcient.com/industry-buzz.html

        Is there something I am missing (brain-fart maybe?)?

        Here is what I am using:
        MODx 9.6.1
        Ditto 2.1.0
        PHx 2.1.3
          • 16892
          • 107 Posts
          should be &paginate and not &pagination
            • 30358
            • 11 Posts
            Can anyone spot why this isn’t working:

            [!Ditto? &parents=`3` &tpl=`FullArticle` &sortBy=`tvGigDate` &dateSource=`tvGigDate` &dateFormat=`%A %d %B` &sortDir=`ASC` &display=`4` &paginate=`1` &paginateAlwaysShowLinks=`1`!]
            
            <p>Showing <strong>[+start+]</strong> - <strong>[+stop+]</strong> of <strong>[+total+]</strong> Articles | Page <strong>[+currentPage+]</strong> of <strong>[+totalPages+]</strong> </p> 
            <div id="ditto_pages"> [+previous+] [+pages+] [+next+] </div> 


            None of the pagination placeholder output anything. I also tried &summarize=`4` in place of &display=`4` with the same result and the page containing the Ditto call is uncached.
              • 4831
              • 57 Posts
              hi, I’ve done some works on pagination and used easy slider to manage a long list of result pages.
              after installing easyslider (http://cssglobe.com/post/4004/easy-slider-15-the-easiest-jquery-plugin-for-sliding)
              here is the code I putted on a chunk named {{easyslider}}. It takes every <li>links</li> and put it in a line whom slide (with two button control).
              <script type="text/javascript" src="assets/js/jquery.js"></script>
              <script type="text/javascript" src="assets/js/easySlider1.5.js"></script>
              <script type="text/javascript">
                  $(document).ready(function(){   
                      $("#slider").easySlider({
                      controlsBefore: '<p id="controls">',
                  controlsAfter:  '</p>',
                   
                          speed:10,
                          continuous:true
                             
                      });
                  }); 
              </script>
              
              <style>
              
              /* Easy Slider */
              
                  #slider ul, #slider li{
                      margin:0;
                      padding:0;
                      list-style:none;
                      }
                  #slider li{ 
                      /* 
                          define width and height of list item (slide)
                          entire slider area will adjust according to the parameters provided here
                      */ 
                      width:20px;
                      height:15px;
                      overflow:hidden; 
                      }
                      p#controls {
                  margin:0;
                  position:relative;
                  } 
              
                   #prevBtn, #nextBtn { 
                  display:block;
                  margin:0;
                  overflow:hidden;
                  text-indent:-8000px;        
                  width:6px;
                  height:15px;
                  position:absolute;
                  left:-8px;
                  top: -16px;
                  }   
              #nextBtn { 
                  left:800px;
                  top: -16px;
                  }                                                       
              #prevBtn a, #nextBtn a {  
                  display:block;
                  width:6px;
                  height:15px;
                  background:url(assets/images/flechegauche.jpg) no-repeat 0 0;  
                  }   
              #nextBtn a { 
                  background:url(assets/images/flechedroite.jpg) no-repeat 0 0;   
                  }
                  
              /* // Easy Slider */
              
              </style>

              after that, modify the code of your ditto snippet line 942 (duplicate and rename it before):
                      $tplPaginatePage = isset($tplPaginatePage)? $ditto->template->fetch($tplPaginatePage) : "<li><a class='ditto_page' href='[+url+]'>[+page+]</a></li>";

              and line 962:
                      $tplPaginateCurrentPage = isset($tplPaginateCurrentPage)? $ditto->template->fetch($tplPaginateCurrentPage) : "<li><span class='ditto_currentpage'>[+page+]</span></li>";

              finally, make a page with a call of your easyslider chunk and you modified ditto snippet. Don’t forget to create the two little pictures for the arrows (flechedroite.jpg and flechegauche.jpg in my script).
              it looks like that:
                • 8779
                • 93 Posts
                How to use Paginate in modX
                I getting frustated on this progress.

                This is my ditto call
                [!Ditto? &startID=`1` &summarize=`2` &paginate=`1`  &paginateAlwaysShowLinks=`1` &tagDelimiter=`,` &tagData=`tvcategoryMain` &tagMode=`onlyTags` &tags=`News` &hiddenFields=`featuredimage`  &tpl=`thumbnailTpl`!]
                
                [+previous+] [+pages+] [+next+]


                But this is not working.
                The previous, pages and next placeholders didn’t showed.

                Help me please. Thank you
                  • 8779
                  • 93 Posts
                  Anyone please help me.
                  I use a uncached ditto and cached ditto. The two of them didn’t work well

                  The uncached ditto shows the next, previous and page link. But when I clicked it, the page is just refresh.

                  And with cached ditto
                  The next, previous and page link doesn’t appear.

                  Anyone could help me to solve this?
                    • 20413
                    • 2,877 Posts
                      @hawproductions | http://mrhaw.com/

                      Infograph: MODX Advanced Install in 7 steps:
                      http://forums.modx.com/thread/96954/infograph-modx-advanced-install-in-7-steps

                      Recap: Portland, OR (PDX) MODX CMS Meetup, Oct 6, 2015. US Bancorp Tower
                      http://mrhaw.com/modx_portland_oregon_pdx_modx_cms_meetup_oct_2015_us_bancorp_tower
                      • 8779
                      • 93 Posts
                      @mrhaw: So? I’m not using PHx. Should I use it? How to use it? It is not clear enough for me.