We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 34162
    • 1 Posts
    This is an auto-generated topic for <a href="http://modxcms.com/extras/package/606">getPage 1.0.0-beta1</a> by splittingred.

    Brief Description:
    A generic wrapper snippet for returning paged results and navigation from snippets that return limitable collections.



    - See the <a href="http://docs.modxcms.com/display/ADDON/getPage">official documentation</a>.

    - Revolution 2.0.0-beta5 or later only.
      • 34162
      • 1 Posts
      does someone has an example of getPage somehow i just don’t get it undecided
        • 26681 MODX Staff
        • 123 Posts
        getPage is not using all the templates I’m specifying, only some of them?!?!?!

        [[!getPage? &element=`getResources` &parents=`[[*id]]` &limit=`8` &tpl=`thumbTpl` &tpl_{3}=`thumbTplThird` &pageNextTpl=`[[$nextTpl]]` &pagePrevTpl=`[[$lastTpl]]` &includeContent=`1` &includeTVs=`1` &processTVs=`1`]]
        [[!+page.nav]]


        Everything works, except:

        • &tpl_{3}=`thumbTplThird` - does nothing. It just uses `thumbTpl`
        • &pagePrevTpl=`[[$lastTpl]]` - does nothing. It uses the default pagePrevTpl

        All the other parameters work! (Yes, including `[[$nextTpl]]` - weird that you have to put a chunk call like that in a param???) Help, please smiley
          [sepiariver.com] (https://sepiariver.com/)
          • 26681 MODX Staff
          • 123 Posts
          Thanks for your reply, Bob. The funny thing is, `[[$nextTpl]]` is working, but neither `thumbTplThird` nor `lastTpl` is working?!?! (FYI, I tried `lastTpl` without the chunk calling syntax and it didn’t work)

          I know, I was surprised too that a chunk call in a snippet call would work - ever. But it’s the only one that does other than `thumbTpl`

          That’s why I’m stumped...

          ***UPDATE: OMG I figured it out. getPage doesn’t work like regular snippets in that you can’t make a chunk with a &Tpl in it and reference it from the snippet call. You have to edit the &Tpl’s in the snippet’s Property Set!!!! Will follow with exact details and a tutorial smiley
            [sepiariver.com] (https://sepiariver.com/)
            • 18373 ☆ A M B ☆
            • 3,141 Posts
            Aint there a big red box in the getPage docs that tells you that? :p
              Mark Hamstra • Developer spending his days working on Premium Extras and a MODX Site Dashboard with the ability to remotely upgrade MODX and extras to make the MODX world a little better.

              Tweet me @mark_hamstra, check my infrequent blog at markhamstra.com, my slightly more frequent ramblings at MODX.today or see code at Github.
              • 3749
              • 24,544 Posts
              Doh. I missed that too. tongue

              @SepiaRiver: You’ll need to create a separate property set if you don’t want your changes to be overwritten when you upgrade getPage.
                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
                • 26681 MODX Staff
                • 123 Posts
                @mark_hamstra Yes there’s big red text - which I didn’t read hahahaah. No, I read it, but didn’t know what the heck it was talking about hahaahaha.

                Thanks Bob. I caught that one - reading the instructions VERY carefully now LOL. I added a new property set and used the getPage@PropertySet syntax

                HOWEVER, still can’t get
                &tpl_{3}=`thumbTplThird`

                to work for getResources. Even sticking it into a property set did nothing. I’m not sure if I’m using the property’s syntax correctly or not but there’s no documentation w/details on it.

                When I get this call working the way I want I’m writing a big ol’ tut tongue

                Thank you both...
                  [sepiariver.com] (https://sepiariver.com/)
                  • 18373 ☆ A M B ☆
                  • 3,141 Posts
                  Responded to your DM already, but for future reference for others:

                  It’s &tpl_3, instead of &tpl_{3} smiley

                  Updated that red box a bit to make it easier to understand, and also updated the getResources property thingy to not be as confusing with curly brackets ’n stuff.
                    Mark Hamstra • Developer spending his days working on Premium Extras and a MODX Site Dashboard with the ability to remotely upgrade MODX and extras to make the MODX world a little better.

                    Tweet me @mark_hamstra, check my infrequent blog at markhamstra.com, my slightly more frequent ramblings at MODX.today or see code at Github.
                    • 26681 MODX Staff
                    • 123 Posts
                    Awesome. That did it. Thanks Mark!! You’re doing a great job with this snippet (and all the others you selflessly work on) smiley

                    Who should I talk to at @modxcms about RTFM login? You mentioned I should post that FormIt info, but I don’t have the creds tongue I’ll happily help out with doc writing....
                      [sepiariver.com] (https://sepiariver.com/)
                      • 18373 ☆ A M B ☆
                      • 3,141 Posts
                      You’ll need a login on modx.com (as a Partner you probably have one), and make sure you have signed a CLA: http://modx.com/developer/cla/

                      Then just contact either one, really. In the past I’ve talked with Ryan, Jay and Shaun about it but no doubt all of them can get you in there wink


                      Can’t wait to have you work on that copy.. but I guess you know how much I love your writing already rolleyes
                        Mark Hamstra • Developer spending his days working on Premium Extras and a MODX Site Dashboard with the ability to remotely upgrade MODX and extras to make the MODX world a little better.

                        Tweet me @mark_hamstra, check my infrequent blog at markhamstra.com, my slightly more frequent ramblings at MODX.today or see code at Github.