We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 22303 MODX Staff
    • 10,725 Posts
    Quote from: Jakob at Oct 24, 2010, 11:36 AM

    I’m wondering if only getResource supports the usage of getPage. I’d like to use getPage for the following (standard) snippets, too:

    But they both seem to provide there own pagination system which is not that powerfully like getPage. Do you know if getPage can be used for these snippets, too?
    If they provide their own pagination then I highly doubt they would be made to work with getPage. Unfortunately, you have to make a Snippet compatible with getPage when you author it.
      • 22739
      • 11 Posts
      Hi,

      I’m using getPage in conjunction with getResources idx property to return a set of numbered results. It works great on the first page, but when I navigate to subsequent paginated pages, the idx number starts over again at 1 rather than continuing with the count. Is there a way to maintain the idx count throughout paginated pages?

      Here’s my call:
      [[!getPage? &element=`getResources` &parents=`13` &tpl=`listNeedResult` &tplOdd=`listNeedResultOdd`]]

      Here an example of my chunk:
      <tr>
      <td>[[+idx]]</td>
      <td><p><strong>[[+longtitle]]</strong>
      [[+introtext]]</p></td>
      </tr>

      getPage 1.0.0
      getResources 1.2.2
      Modx Revolution 2.0.0

      thanks!
        • 22303 MODX Staff
        • 10,725 Posts
        You can use this in your tpl:
        [[+offset:add=`[[+idx]]`]]

          • 22739
          • 11 Posts
          Quote from: OpenGeek at Dec 01, 2010, 11:34 AM

          You can use this in your tpl:
          [[+offset:add=`[[+idx]]`]]



          Works great. Thanks OpenGeek!!
            • 10257
            • 55 Posts
            I set up getPage and Archivist like it is described on http://rtfm.modx.com/display/revolution20/Creating+a+Blog+in+MODx+Revolution

            Now when I say "just posts from 2007" the call will be translated to /archives/2007. That works as expected. But the pagination won’t redirect to /archives/2007?page=2, but rather to /archives/?page=2, what is not what I want.

            Is there some solution to this?