We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 23571
    • 223 Posts
    Does anyone know a good method for having Ditto not display the paginate information if it is not needed?

    If the number of documents found is less than or equal to the &summarize. I have tried &paginateAlwaysShowLinks=`0`, but I think I am misunderstanding the intent of this parameter.
      • 27361
      • 8 Posts
      Hmm....if I read things right, you can edit the Ditto snippet a bit to achieve this. On line 825, you’ll find this:
      	if($paginate == 1) {
      

      If you change it to this, it should do what you want:
      	if($paginate == 1 && $count > $summarize) {
      


      Hope this helps!
        • 23571
        • 223 Posts
        It does. That did it.

        Thanks, Greg!
          • 24495
          • 407 Posts
          Why editing the snippet itself? What about updates for Ditto? Better using PHX:
          [+totalPages:is=`1`:then=``:else=`<p class="pagination">[+previous+][+pages+][+next+]</p>`+]

          Adapt it to your needs.