Greetings,
A little issue ive come accross and havent broached it before.
I have a functioning MIGx database which outputs fine with Rowboat, however from the MIGxDB i want to pick the values within a MIGx TV to output a selection defined in the TV.
each Row of the TV would represent a different row in the Database.
So, if I wanted to show 4 videos I could add 4 items to the TV, and pick from the DB the Video i want on each item.
So, my MIGXtv is setup like this:
videoList
[
{"caption":"Info", "fields": [
{"field":"title","caption":"Title"},
{"field":"video_id","caption":"Video Id","inputTV":"videoSelect"}
]}
]
The videoSelect Tv looks like this
Type: Dropdown Single Select
Input Option:
@EVAL return '--- Choose Item ---'.$modx->runSnippet('Rowboat',array('table'=>'modx_video_db','where'=>'{"published":"1"}','tpl'=>'videoList'));
videoList tempalte chunk
This generats the title as the dropdown.
The output of the videoList tv is as follows:
[{"MIGX_id":"1","title":"DS","video_id":"1"},{"MIGX_id":"2","title":"TF","video_id":"2"}]
Now, my getImageList call for the TV is as follows:
[[!getImageList?
&tvname=`videoList`
&tpl=`videoListSingle`]]
with the tpl of
[[!Rowboat?
&table=`modx_video_db`
&tpl=`VideoItem`
&where=`{"id":"[[+video_id]]"}`
]]
Id is referenced in the MIGxDb, but I cannot tie the value of the TV to the Rowboat Tpl to get the video Id to output the above rowboat call.
i've tried using a getter, to get the argument, but obviously this isnt being passed as an argument, and quick frankly im stick on how to tie the two togther.
Thanks
Tyr
EDIT: Seems that after looking back over it after eating im a dunce, so posting incase anyone else comes across the same. neede the LIKE in the JSON
[[!Rowboat?
&table=`modx_video_db`
&tpl=`VideoItem`
&where=`{"id:LIKE":"[[+video_id]]"}`
]]