Yes sorry my post was not to clear posted after not able to get this to work and with frustration (-:
ok I am trying to get images from child resources under another parent show up in the header of the site on all pages for a slideshow, these child resource all have images added with MIGx multi-upload function and output on their respective pages fine with just a getmageList call
Here is all my calls:
On a resource with an ID of 14 where I am testing this I have:
[[!getResources?
&parents=`10`
&tvname=`resourcealbum`
&depth=`2`
&tpl=`slide1`
&includeTVs=`1`
&processTV=`1`
&showHidden=`1`
&limit=`3`
&element=`getResources`
&sortdir=`desc`]]
tpl slide1
[[!getImageList?
&tvname=`resourcealbum`
&docid=`[[+id]]`
&tpl=`slideImg`
&limit=`1`
&menutitle=`[[+menutitle]]`
]]
tpl slideImg
<img src="[[+image:phpthumbof=`w=400&h=400&zc=1`]]" alt="[[+menutitle]]">
Output of above as follows:
<img src="/assets/resourceimages/14/r1150b.jpg" alt="2003 03 Reg BMW R1150 1150 cc R1150 GS Adventure ABS, F.S.H ">
<img src="/assets/resourceimages/14/harleysportster7.jpg" alt="2006 06 Reg HARLEY-DAVIDSON SPORTSTER 883 cc">
<img src="/assets/resourceimages/14/bmw1200-9.jpg" alt="2006 06 Reg BMW R1200 1200 cc R1200 GS ">
Images wont display as file path is wrong. The directory 14 in them paths is actually the ID of the page this getResources call is on and not the directory the images are stored in.
If I ran this call from a page with an ID of 15 then they would all start with /assets/resourceimages/15/
But the menutitle and the final image name are correct its when the getImageList loops though pages its inserting the page ID of where that getResources is on rather than inserting the directory number of where the image actually is.
I know on the set up I had to add the following to the media source basepath and baseurl: [[migxResourceMediaPath? &pathTpl=`assets/resourceimages/{id}/`]]
Seems like the {id} is getting the ID of the page the getresources call is on instead of where the image is.
Sorry for my original confusion I hope this time I have explained it better and thanks for the help.
Thanks
[ed. note: panfire last edited this post 10 years, 2 months ago.]