We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 39115
    • 15 Posts
    please open the Attachment of this post to see a problem. [ed. note: quardas last edited this post 11 years, 10 months ago.]
      • 19369
      • 1,098 Posts
      Try cached/uncached combinations, for example Ditto uncached and getIDs cached, or both uncached, or Ditto cached and getIDs uncached.
      [!getIDs!]
      [!Ditto?!]

      If that doesn't work, try with this pagination snippet:
      http://modx.com/extras/package/splitpagination
        • 4172
        • 5,888 Posts
        this is evos old cached/uncached - issue.

        you will need to call it like that:
        [!Ditto? &documents=`[[getIDs]]`!]


        or like that:

        [[Ditto? &documents=`[!getIDs!]`]]


        not sure which one will do it.
        Or Call Ditto inside your getIDs - snippet with
        return $modx->runSnippet('Ditto',$params);



          -------------------------------

          you can buy me a beer, if you like MIGX

          http://webcmsolutions.de/migx.html

          Thanks!
          • 39115
          • 15 Posts
          unfortunately not.. It's not problem with caching imo. Its problem with paginate and passing list of documents via &documents=`` paramenter.
          I have checked all your propositions and It's not working.
            • 39115
            • 15 Posts
            I have solved this problem in the other way. How I wrote before, the pagination in this situation is working (when I put a &start=0, &start=1 in site-url). I have installed the countDocs extender in DItto:

            http://forums.modx.com/thread/32686/count-child-documents-and-output-them

            And I have written stupid simple snippet "mypager" to calculate link in pagination based on count of documents calling by ditto:

            calling the pager:

            [[mypager?c=`[[Ditto? &documents=`<?php echo $result ?>` &showInMenuOnly=`1` &tpl=`item_subdocs` &extenders=`countDocs` &display=`1` &tpl=`count` ]]`]]


            ($result is a dinamically created string like '9,12,23,123,123,412,1232')


            mypager Snippet code:

            <?php
            if (is_numeric($c)) {
            	$marker = 0;
            	$i=1;
            	while ($c>$marker) {
            		echo '<a href="[(site_url)][~[*id*]~]?tag='.$_GET['tag'].'&start='.$marker.'">'.$i.'</a> ';
            		$marker+=4;
            		$i++;
            	}
            }
            ?>
            


            maybe it helps to someone