We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 36628
    • 1 Posts
    Hi Mod X Community,

    I am trying to create a page that displays variables from all its child pages...however many children there are.

    Children may have variables such as Image, Quote & Body. Then for each child, the parent page would create a new table row or DIV row and place those variables in their appropriate place.

    I am new to Mod X so I don't know the best way to call the information I need and if there is a snippet for doing this, that would be great. I've seen Ditto used before for Evolution but have they discontinued it for Revolution? I've copied the code over and it doesn't work.

    Any help would help a LOT!! Thank you!
      • 33968
      • 863 Posts
      For Revo you can use getResources which performs a similar (though not the same) function as Ditto.

      An example that will loop through all child pages and their TVs would be:
      [[!getResources? &parents=`[[*id]]` &tpl=`rowTpl` &includeTVs=`1` &processTVs=`1` &limit=`0`]]
      

      And your rowTpl:
      <tr>
          <td>[[+pagetitle]]</td>
          <td><img src="[[+tv.image]]" alt="[[+pagetitle]]" /></td>
          <td>[[+tv.quote]]</td>
          <td>[[+tv.body]]</td>
      </td>