We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 46396
    • 14 Posts
    Hello
    I am a beginner in MODx, in my website I have a Parent page and pages 3 children, each child page has a TV that contains an image capture with migx
    How do I display the 3 images in the parent page
    Thanks for ansower
      • 4172
      • 5,888 Posts
      you can get the pages with pdoResources:

      [[pdoResources?
      &parents = `XX`
      &includesTVs = `yourMIGXtv`
      &prepareTVs = `1`
      &tpl = `resourceImageTpl`
      ]]


      to get the first MIGX-image of each Resource
      in the resourceImageTpl - chunk:

      [[getImageList? &docid=`[[+id]]` &tvname=`yourMIGXtv` &limit=`1` &tpl=`imageTpl`]]


      in your imageTpl - chunk:

      <img src="[[+image]]" />
        -------------------------------

        you can buy me a beer, if you like MIGX

        http://webcmsolutions.de/migx.html

        Thanks!
        • 46396
        • 14 Posts
        thank you very much BRUNO-17 for your help, it working well
          • 36516
          • 179 Posts
          I'm curious: why have you used MIGX to capture the images? It sounds like you've only got one image per page. MIGX seems unnecessary so I wonder how you're using it.
            • 30912
            • 463 Posts
            There might be scope to add more images in the future - thats the only reason I would go that approach - the what if

            alternatively i would have done it with a simple image tv assigned and then getResources to bring them through to the parent page - but its all subjective.