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
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:
thank you very much BRUNO-17 for your help, it working well
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.
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.