Trying to filter and match multiple TVs with getResources and have hit a snag...
A TV value is set on a template (call it Template1) as either 0 or 1. For this example, call this TV [[show]].
For any resource where [[show]]==1, I want to also compare two more TVs. The first is also associated to Template1. Call it [[category1]].
The second TV -- call it [[category2]] -- is associated to Template2.
So I want this: IF [[show]]==1 AND [[category1]]==[[category2]] THEN [[myChunk]]. This request is on a resource that doesn't use any aforementioned TV.
I've combined the match for [[show]]==1 with [[category1]]==[[category2]] in getResources tvFilters, but with null results. If I remove the second filter ([[category1]]==[[category2]]), I get results, so it's the second comparison that isn't right.
[[!getResources:default=`Null`?
&parents=`2` // container for all resources assigned Template1 or Template2
&where=`{"template:IN":[1,2]}`
&includeTVs=`1`
&includeTVList=`show,category1,category2`
&tvFilters=`show==1,category1==category2`
&tpl=`myChunk`
&limit=`1`
&sortby=`RAND()`
]]
I've played with adding a wildcard to the second match in tvFilters, but with no luck. Is there something incorrect here that I'm missing?
P.S. I'm doing this in the first place because [[myChunk]] uses template tags from resources using both Template1 and Template2, hence the need for the comparisons.