We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 18961 ☆ A M B ☆
    • 237 Posts
    O.k. As usual, I'm feeling like an idiot because I can't get getPage to work. This is the first time I'm trying and the instructions seem fairly clear yet I get nothing when put the call in my page. So, here's the call:

    [[!getPage? &elementClass=`modSnippet` &element=`getResources` &showHidden=`1` &parents=`4` &tpl=`page-obits` &includeTVs=`1` &processTVs=`1` &pageLimit=`5` &pageNavVar=`page.nav`]]
    
    [[!+page.nav]]


    I've basically copied this from the instruction page and made a few modifications. I just end up with a blank page. Everything is working fine when I'm using getResource, but I need to limit these to 5 per page and there will be a lot of them.

    Can anyone point me in the right direction?

    Here's the page: http://www.fineganfh.com/newsite/obituaries/

    Modx 2.2.4

    Need anything else?

    Thanks! [ed. note: mdsdesign last edited this post 14 years ago.]
      Michael Smull
      http://www.bigpixelstudio.com
      twitter: @mdsdesign
      • 27708 MODX Staff
      • 2,502 Posts
      What fields are in your chunk? What happens when you use just a vanilla get resources call, can you post the call? What happens if you remove the value for &tpl? It should return an array of values I think.

        Author of zero books. Formerly of many strange things. Pairs well with meats. Conversations are magical experiences. He's dangerous around code but a markup magician. Blog ✦ Twitter ✦ LinkedIn ✦ GitHub
        • 18961 ☆ A M B ☆
        • 237 Posts
        getResource works fine with the template. Here it is:

        <div class="ObituariesRow">
                <div class="Date">Posted on [[+createdon:strtotime:date=`%A %b %e, %Y`]]</div>
                [[+tv.obitphoto]]
                <h4>[[+pagetitle]]</h4>
                <p>[[+introtext]]</p>
                <a href="[[~[[+id]]]]" class="FullRead">Read the Full Obituary »</a>
                <div class="clear"></div>
        </div>


        The array works fine. Very long. Don't think I should paste it here.
          Michael Smull
          http://www.bigpixelstudio.com
          twitter: @mdsdesign
          • 27708 MODX Staff
          • 2,502 Posts
          What does your getResources call look like. I wonder about &includeContent or &includeTVs. What happens if you uncache the page too?
            Author of zero books. Formerly of many strange things. Pairs well with meats. Conversations are magical experiences. He's dangerous around code but a markup magician. Blog ✦ Twitter ✦ LinkedIn ✦ GitHub
            • 18961 ☆ A M B ☆
            • 237 Posts
            Here's the getResource call which is in place now and working fine.

            [[getResources? &parents=`4` &tpl=`page-obits` &includeTVs=`1` &processTVs=`1`]]


            O.k. - Uncached the page. Will try it.
              Michael Smull
              http://www.bigpixelstudio.com
              twitter: @mdsdesign
              • 18961 ☆ A M B ☆
              • 237 Posts
              I put the getPage call back in and uncached the page. Now it looks like I get the two documents that are there, just no navigation.
                Michael Smull
                http://www.bigpixelstudio.com
                twitter: @mdsdesign
                • 27708 MODX Staff
                • 2,502 Posts
                I am going to ask a question that may seem absurd but is getPage actually installed in PM?
                  Author of zero books. Formerly of many strange things. Pairs well with meats. Conversations are magical experiences. He's dangerous around code but a markup magician. Blog ✦ Twitter ✦ LinkedIn ✦ GitHub
                  • 27708 MODX Staff
                  • 2,502 Posts
                  I guess that answers that. Set the &pageLimit=`1` so you'll have to page with the 2 entries.
                    Author of zero books. Formerly of many strange things. Pairs well with meats. Conversations are magical experiences. He's dangerous around code but a markup magician. Blog ✦ Twitter ✦ LinkedIn ✦ GitHub
                    • 18961 ☆ A M B ☆
                    • 237 Posts
                    Yes. I checked that as well. Because, I'm certainly the kind of guy who would miss that.
                      Michael Smull
                      http://www.bigpixelstudio.com
                      twitter: @mdsdesign
                      • 18961 ☆ A M B ☆
                      • 237 Posts
                      Well, now. That makes sense.
                        Michael Smull
                        http://www.bigpixelstudio.com
                        twitter: @mdsdesign