We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 37278
    • 6 Posts
    Hi

    I'm trying to display level 0 children on the parent page, and as part of the data to be displayed, is a custom "pagepicture" TV which is set as an Image.

    I have spent hours and can't figure out how to simply pull the Child's TV value, in this case "[[*pagepicture]]", rather than the actual parent.

    I would greatly appreciate any help.

    Many thanks
    Sam


    SubPage Chunk

     </li> <h3><a href="[[~[[+id]]]]">[[+pagetitle]]</a><a class="image" href="[[~[[+id]]]]">[[*pagepicture]]</a></h3><li>
    
    


    Code:
    <ul class="content-listing">
    [[!getResources:default=`No results found`?
      &parents=`[[*id]]`
      &hideContainers=`0`
      &includeTVs=`1` 
      &processTVs=`1`
      &tvPrefix=``
      &depth=`0`
      &tpl=`SubPages`
      &sortby=`longtitle` 
      &sortdir=`ASC`
    ]]
    </ul>
    [ed. note: modena last edited this post 15 years ago.]
      • 3749
      • 24,544 Posts
      Try this:

      [[+pagepicture]]


      A tag with * will always show the value from the current resource (the one with the getResources tag). You want a placeholder tag, which getResources will replace with the value from each retrieved resource.
        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
        • 37278
        • 6 Posts
        Thanks Bob, appreciate it, it worked like a charm.