In relation to:
http://rtfm.modx.com/extras/revo/migx/migx.tutorials/migx.use-resource-specific-mediasource-and-multifile-uploader
Using latest modx and migx
Hi,
In my home page template I call the chunk fstudents
[[!getResources? &parents=`116` &limit=`4` &tpl=`fstudents` &includeTVs=`1` &processTVs=`1`]]
fstudents:
[[!getImageList? &tvname=`bio-slider` &tpl=`thumbTpl` &limit=`1` &docid=`[[+id]]`]]
thumbTpl:
<h1>[[+title]]</h1><img alt="" src="[[+image:pthumb=`w=310&h=270&f=jpg&zc=1&aoe=1`]]">
My home page source code shows that thumbTpl renders as :
<img alt="" src="/assets/resourceimages/resource[u]1[/u]/pic.jpg">
instead of
<img alt="" src="/assets/resourceimages/resource[u]12[/u]/pic.jpg">
where the image was uploaded to.
Titles get displayed correctly. Image path doesn't. My home page has resource ID of 1 so it seems to be getting resource1 in the filepath from that.
Here's my migx config for the TV. Any ideas how to get the correct file path to the image please?
Thanks
{
"formtabs":[
{
"MIGX_id":1,
"caption":"Image",
"fields":[
{
"field":"title",
"caption":"Main Image Title",
"MIGX_id":1
},
{
"MIGX_id":2,
"field":"image",
"caption":"Image",
"inputTV":"",
"inputTVtype":"image",
"configs":"",
"sourceFrom":"migx",
"sources":"",
"inputOptionValues":"",
"default":""
}
]
}
],
"contextmenus":"",
"actionbuttons":"upload||loadfromsource",
"columnbuttons":"",
"filters":"[]",
"extended":{
"migx_add":"",
"formcaption":"Image",
"update_win_title":"Slider Images",
"win_id":"resourcegallery",
"maxRecords":9,
"addNewItemAt":"bottom",
"multiple_formtabs":"",
"actionbuttonsperrow":4,
"winbuttonslist":"",
"extrahandlers":"",
"filtersperrow":4,
"packageName":"",
"classname":"",
"task":"",
"getlistsort":"",
"getlistsortdir":"",
"use_custom_prefix":"0",
"prefix":"",
"grid":"",
"gridload_mode":1,
"check_resid":1,
"check_resid_TV":"",
"join_alias":"",
"has_jointable":"yes",
"getlistwhere":"",
"joins":"",
"cmpmaincaption":"vxcvxc",
"cmptabcaption":"xcvxcv",
"cmptabdescription":"xcvxc",
"cmptabcontroller":"vxcvxcvxcv",
"winbuttons":"",
"onsubmitsuccess":"",
"submitparams":""
},
"columns":[
{
"MIGX_id":1,
"header":"ID",
"dataIndex":"MIGX_id",
"width":10,
"renderer":"",
"sortable":"false",
"show_in_grid":1
},
{
"MIGX_id":2,
"header":"Main Title",
"dataIndex":"title",
"width":20,
"renderer":"",
"sortable":"false",
"show_in_grid":2
},
{
"MIGX_id":3,
"header":"Image",
"dataIndex":"image",
"width":20,
"renderer":"this.renderImage",
"sortable":"false",
"show_in_grid":3
}
]
}