Resource list TVs work in MigX but in my experience you get the resource number displayed in the manger end rather than the URL or resource name. They render fine with processTVs turned on in the front end, but don't appear to be processed in the backend.
Quote from: MokoJumbie at Mar 25, 2013, 11:36 PMTrue, that should work as described. Also, I think the reason that 'inputTV: text' works is probably because it's the default inputTVtype.
Correct me if I'm wrong, but doesn't 'inputTVtype' not allow for any customisation? For example with a Resource List TV, you wouldn't be able to limit the list to a specific parent container.
page title==pagetitle:id
@EVAL $output = $modx->runSnippet('getResources',array('parents'=>'0','tpl'=>'@INLINE [[+pagetitle]] [[+parent:isnot=`0`:then=`(`:else=``]][[getResourceField? &id=`[[+parent]]` &field=`pagetitle`]][[+parent:isnot=`0`:then=`)`:else=``]]==[[+pagetitle]]:[[+id]]','outputSeparator'=>'||','sortby'=>'pagetitle','sortdir'=>'ASC','limit'=>'0'));return '- Select a page==||' . $output;
{ "header": "Internal link", "sortable": "false", "dataIndex": "page","renderer":"this.renderFirst" }
<?php $val = explode(':',$input); return $val[0];
[[+page:renderFirst]]
@CHUNK PageLister
[[getResources? &limit=`0` &tpl=`@INLINE [[+pagetitle]]==[[+pagetitle]]:[[+id]]` &parents=`3,19` &outputSeparator=`||`]]
there are just some settings possible for inputTVtype:So how do I specify the media source for in inputTVtype of image? Apparently simply assigning the TV to a media source like any image-type TV doesn't do the trick. Can it be done in the Form Tabs field, or do I need to use a Configuration?
mediasources, input Option Values, default value, configs(for MIGX and MIGXdb TVs), caption, description(since 2.4)
If you need more advanced settings on special TV-input-types you will need to use a inputTV.
{ "MIGX_id":2, "field":"image", "caption":"Image", "description":"", "description_is_code":"0", "inputTV":"", "inputTVtype":"image", "configs":"", "sourceFrom":"config", "sources":[ { "MIGX_id":1, "context":"web", "sourceid":1 }, { "MIGX_id":2, "context":"de", "sourceid":1 } ], "inputOptionValues":"", "default":"" }
{"field":"title","caption":"Title","MIGX_id":1},{"MIGX_id":"2","field":"image","caption":"Image","description":"","description_is_code":"0","inputTV":"","inputTVtype":"image","configs":"","sourceFrom":"config","sources":"[{\"MIGX_id\":\"1\",\"context\":\"web\",\"sourceid\":\"1\"},{\"MIGX_id\":\"2\",\"context\":\"de\",\"sourceid\":\"1\"}]","inputOptionValues":"","default":""}
"Helper" TVs still work but are no longer needed; use inputTVtype: instead of inputTV:
{"field":"day", "caption":"Day", "inputTVtype":"listbox"},