I have a unique hack for TVs that I am implementing incorrectly. A college lists courses and wants to manually select the faculty when they edit the resource for the course page.
To generate a dynamic list of faculty, I am using checkboxes with an @SELECT binding to grab the id of faculty resources and store them as TVs. This works fine.
@SELECT pagetitle,id FROM modx_site_content where parent=109 order by pagetitle ASC
The problem is that the TV values are storing the content ID with the delimiter || and I use ditto to create lists of the courses for each faculty member.
[!Ditto? &parents=`50,396,304` &filter=`facultyTV,[+id+],9` &tpl=`course_list` &noResults=`empty_chunk` !]
When Ditto filters the results, it doesn’t pay attention to the delimiters and just looks for strings that match my id. For instance, when Ditto is looking for only the id "151" it returns true when it sees 331||513
Clearly, I can’t make Ditto do this, but I’m hoping someone has a better suggestion for how to achieve this with TVs. I want to return all the courses for each faculty member and output as a chunk, but not sure how else to do this other than Ditto without writing some custom snippet. Is there an easier way?