I'm trying to use MIGX to display items filtered by the content of a checkbox field:
Monday==Monday||Tuesday==Tuesday||Wednesday==Wednesday||Thursday==Thursday||Friday==Friday||Saturday==Saturday||Sunday==Sunday
The output isn't being delimited, yet, because at first it didn't seem necessary. First I tried my own snippet filter, but even upon reducing it to:
...it wouldn't stop outputting everything anyway. Never solved that one, except to switch to 'contains' after reading about it in the changelog (neither are in the full documentation yet) which appeared to work remarkably, saving me the bother of writing the script to look for the day string in the concatenated bunch.
&where=`{"days:contains":"Sunday"}
Seemed perfect till I start noticing that certain days were squeezing through the filter inexplicably. I haven't managed to figure it out yet, hence this post. I've got an example written to the page where the filter is somehow finding 'Sunday' in the following string:
MondayTuesdayWednesdayThursdayFridaySaturday
Other day names are successfully filtered out. I've seen another example of an unwanted day being found where it doesn't appear.
I'll continue experimenting, but for now I'm at a loss as to why my filter snippet had absolutely no effect at all, and why this strikingly useful 'contains' filter seems not to work very well.
I'd like to see proper documentation. I have no idea how either really work, and it would be nice to know how flexible 'contains' really is. I presume it'll look for strings within strings, as I've been using it, because I observe it to be working. Maybe that's a fluke and it's not really working at all. I worked from the snippet example here, with no luck:
http://forums.modx.com/forums/thread/80164/filter-with-where-parameter#dis-post-441721
Here's hoping Bruno17 will chime in, I know he'll have the answers.