We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 28121
    • 107 Posts
    I’m hoping to develop a very simple blog on a site and at the moment would be happy just to output the content of some child recources onto a page. I’m new to getResources and am trying to following code but it just spits out a huge list of arrays instead of any actual content.

    [[!getResources? &parents=`18`]]

    I’ve looked at the forums, the official getResources pages etc but it’s not clicking just yet.
    Any help would be appreciated as I know once I can ’get started’ that I can explore more parameters.
      • 28215
      • 4,149 Posts
      You need to specify a chunk via &tpl that will contain the content for each result. Example:

      [[!getResources? &parents=`18` &tpl=`blogPost`]]
      


      And a chunk called ’blogPost’:

      <li><a href="[[~[[+id]]]]">[[+pagetitle]]</a></li>
        shaun mccormick | bigcommerce mgr of software engineering, former modx co-architect | github | splittingred.com
        • 28121
        • 107 Posts
        Hi Shaun. Will do. Thanks for taking time to reply. Much appreciated.
        I’ve used chunks before but not as placeholders / templates.