Hi, i'd like to create listbox TV with values loaded from MIGx TV of some resource.
So I use @SELECT value FROM modx_site_tmplvar_contentvalues WHERE id=14
and become array:
[{"MIGX_id":"1","image":"assets/data/images/apr.jpg","description":"First Image"},{"MIGX_id":"2","image":"assets/data/images/veb.jpg","description":"Second Image"},{"MIGX_id":"3","image":"assets/data/images/jun.jpg","description":"Third Image"},{"MIGX_id":"4","image":"assets/data/images/sd02.jpg","description":"Fourth Image"}]
can it be processed do display descriptions in listbox?
thx
you will need to have snippet, which returns the values in this format:
Fist Image||Second Image||Third Image||Fourth Image
and use @EVAL - binding to call that snippet:
@EVAL return $modx->runSnippet('mySnippet',array('param1'=>'value1','param2'=>'value2'));