It's been months but I'm back at this problem. I'm hoping someone can help me a little. Right now I've got the following idea to only show the latest comments for articles that below to a certain category:
1) get a list of ID's of articles in the right category (for example get the last 50). I use getResources to do this, and a chunk to display the results like this:
[[!getResources? &parents=`12` &tvFilters=`category==%blog%`&showHidden=`1` &includeTVs=`1` &tpl=`blogIdsTpl` &tplLast=`blogIdsTplLast` &limit=`20` & toPlaceholder=`ids`]]
chunks:
blogIdsTpl:
blogIdsTplLast:
This works so far.
2) Use this generated list in Rowboat to get the latest comments only for the articles with category 'blog'.
[[!Rowboat?
&table=`modxm_quip_comments`
&tpl=`latest_comments`
&limit=`10`
&where=`{"thread:IN":[[[+ids]]]}`
&debug=`1`
]]
This is where it's not working anymore. The debugging information shows no where statement at all, and all the results are returned.
What's wrong with my where statement, anyone can see a problem?
NB: when I put in the where statement directly like this, it still doesn't work:
&where=`{"thread:IN":['article-b12-2240', 'article-b12-2241']}`
Is this the wrong way of doing it?
Any advice on how I should handle my problem?
Thanks for any help!!!
[ed. note: michelle84 last edited this post 11 years, 10 months ago.]