We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 48362
    • 12 Posts
    Hi guys, after a long time away I'm getting back to finishing what I started.

    Plain and simple, I got a lot working already, but when I'm using getResources to call for my content it doesn't output any content. I am however, able to pull the titles from the documents!

    This is the template from where I'm making the call for all the pages that have parent '5':
    <html>
    <head>
    <title>[[++site_name]] - [[*pagetitle]]</title>
    <base href="[[++site_url]]" />
    [[insert_css?]]
    </head>
    <body>
    <div id='header'>[[Wayfinder? &startId=`0` &level=`1` &outerTpl=`mdbnlv1-nav` &removeNewLines='1']]</div>
    
    [[getResources?
      &parents=`5`
      &limit=`10`
      &tpl=`blogTpl`
      &showHidden=`1`
      &sortby=`{"publishedon":"DESC"}`]]
    
    [[*content]]
    
    </body>
    </html>


    This is the blogTpl chunk, first had it as a template, but that didn't work somehow:
    <div class="project_container">
      <div class="project_text">
    <p class="project_text_head">[[+pagetitle]]</p>
    
    [[+content]]
    
      </div>
      <div class="project_image">
      <img src="assets/images/infillimg1.jpg">
    <div class="project_image_text">
    And here some text to show underneath the image, it's okay
    </div>
      <img src="assets/images/infillimg1.jpg">
      </div>
    </div>


    Is there anything I should show besides this for someone to be able to tell me what I'm doing wrong?
    I've been trying to fix this for HOURS and now I'm done, there is no progression on my side anymore and hope someone can help me out with this smiley
    -Marinus

    This question has been answered by ottogal. See the first response.

    • discuss.answer
      • 22427
      • 793 Posts
      I think you should add the property &includeContent=`1` to your getResources call.
      See http://rtfm.modx.com/extras/revo/getresources
        • 48362
        • 12 Posts
        Quote from: ottogal at Jul 30, 2014, 06:15 AM
        I think you should add the property &includeContent=`1` to your getResources call.
        See http://rtfm.modx.com/extras/revo/getresources

        Hi, thanks for your reply, now it works perfectly! smiley

        One thing, I have not found the includecontent mentioned anywhere in any guide I've come across. Am I maybe using the wrong call for get?

        Should I maybe use getPage or, should I use another way to ask for an array of pages to be displayed in my site?
          • 22427
          • 793 Posts
          I have not found the includecontent mentioned anywhere
          You find it in the Doc page I linked to, in the table "Other Properties".

          Scrolling down on the same page, you find a section "Using getPage for Pagination".

          getPage ist just for pagination, the output of the pages is completely done by getResources (or some other collecting snippet).
            • 48362
            • 12 Posts
            Quote from: ottogal at Jul 30, 2014, 01:34 PM
            I have not found the includecontent mentioned anywhere
            You find it in the Doc page I linked to, in the table "Other Properties".

            Scrolling down on the same page, you find a section "Using getPage for Pagination".

            getPage ist just for pagination, the output of the pages is completely done by getResources (or some other collecting snippet).

            Yes, I had found it oofcourse, I had been reading the whole doc for 3 hours before I opened this topic.

            What was behind what you re-quoted was this:
            "in any guide I've come across."

            What I mean is, how can all these guides be there and not mention includecontent anywhere? That's what I was wondering smiley

            I actually had includecontent in my call, but removed it after something didn't seem to work and never put it back after fixing the other part of my code.. Dumb dumb..