I have a nested MIGX TV which gets its fields from a migxdb config. One of the fields is a dropdown TV courseId
which gets me a list of entries from a custom table and saves the ID. So far, everything is working fine and I can save the selected ID.
Now I wanted to display the actual name of that entry in the columns view and not just the ID by setting up a custom renderChunk, also inside the MIGX CMP:
[[migxLoopCollection?
&packageName=`courses`
&classname=`Course`
&tpl=`renderCourseTitle` // [[+name]]
&where=`{"id": "[[+courseId]]"}`]]
Now, when I select an entry and hit save the actual name is displayed like I want it to. However when I Save and Close
to get a level higher in the nested TV and then go back in again, the field is blank.
To my surprise it seems like the actual value (the ID) which was saved is gone now. I thought that the renderChunk was just for display in the columns? It does break my frontend though, which relies on the ID, so I’m not sure where my mistake is here.