We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 21767
    • 44 Posts
    Is it possible to use getPage with QuipLatestComments?
      • 3749
      • 24,544 Posts
      getPage should work with any snippet that returns output. It just takes the output and splits it into pages.
        Did I help you? Buy me a beer
        Get my Book: MODX:The Official Guide
        MODX info for everyone: http://bobsguides.com/modx.html
        My MODX Extras
        Bob's Guides is now hosted at A2 MODX Hosting
        • 21767
        • 44 Posts
        I have moved the getPage-call to another site. Now, it works as expected.

        Before that i tried to use two different getPage-calls on the same site. And the second one drew again the output data from the former call.
          • 21767
          • 44 Posts
          There is also another problem. The templates pageNavTpl, pageActiveTpl, pageFirstTpl, ... pageNextTpl are not made for QuipLatestComments.
            • 16430
            • 217 Posts
            I dont know why, but this code doesnt shows paging only limited number of outputs:
            [[!getPage? &elementClass=`modSnippet` &element=`QuipLatestComments` &bodyLimit=`500`  &limit=`10` &type=`user` &user=`[[!+modx.user.id]]` &tpl=`hodnoceni-tpl` &pageVarKey=`page`]] 
            
            <div class="pageNav"><ul>[[!+page.nav]]</ul></div>
              • 47779
              • 13 Posts
              Quote from: kudykam at Jul 09, 2013, 01:44 PM
              I dont know why, but this code doesnt shows paging only limited number of outputs:
              [[!getPage? &elementClass=`modSnippet` &element=`QuipLatestComments` &bodyLimit=`500`  &limit=`10` &type=`user` &user=`[[!+modx.user.id]]` &tpl=`hodnoceni-tpl` &pageVarKey=`page`]] 
              
              <div class="pageNav"><ul>[[!+page.nav]]</ul></div>

              Hello! Did you fix the problem? I have the same task to integrate getPage & QuipLatestComments, but [[!+page.nav]] still empty.
                • 47779
                • 13 Posts
                Solved the problem. If somebody needs...

                /core/components/quip/controllers/web/LatestComments.php 179:

                //$c->limit($this->getProperty('limit',10),$this->getProperty('start',0));
                $this->modx->setPlaceholder('total',$this->modx->getCount('quipComment',$c));
                $limit = $this->getProperty('limit',10);
                $page  = isset($_GET['page']) ? $_GET['page'] : 0;
                $c->limit($limit, $page * $limit - ($page ? $limit : 0));
                


                Then the code will work:

                    [[!getPage?
                        &element=`QuipLatestComments`
                        &tpl=`quipLatestComment`
                        &bodyLimit=`500`
                        &limit=`10`
                    ]]
                    [[!+page.nav]]
                


                Have a nice day smiley