开发者

Modx: getResources filtered by TV

开发者 https://www.devze.com 2023-02-08 02:47 出处:网络
I have a TV \"Tags\", comma separated… the usual stuff. Now I want to show only resources with 开发者_JAVA技巧a specific TV:

I have a TV "Tags", comma separated… the usual stuff. Now I want to show only resources with 开发者_JAVA技巧a specific TV:

<ul class="resource-by-tag">
  [[!getResources? &parents=`15` &tpl=`resourceByTagRow` &includeTVs=`1` &processTVs=`1` &tvFilter=`tags==rundfunk` &tvPrefix=``]]
</ul>

As you might guess this doesn't work… but why? It shows all resources no matter what.

Thanks in advance!


It was just a typo:

[[!getResources? &parents=`15` &tpl=`resourceByTagRow` &includeTVs=`1` &processTVs=`1` &tvFilters=`tags==rundfunk` &tvPrefix=``]]

Works as expected. It must be tvFilters instead of tvFilter.


I'm guessing that it may have something to do with &tvFilter='tags==rundfunk' and tags looking something like this ahfunk, beefunk, redfunk the tag would include redfunk but would not ==redfunk

have you tried using where? I only see it with the = clause, but you might have more choice there.

0

精彩评论

暂无评论...
验证码 换一张
取 消