Modx:按电视过滤的 getResources
我有一个电视“标签”,用逗号分隔......通常的东西。现在我只想显示特定电视的资源:
<ul class="resource-by-tag">
[[!getResources? &parents=`15` &tpl=`resourceByTagRow` &includeTVs=`1` &processTVs=`1` &tvFilter=`tags==rundfunk` &tvPrefix=``]]
</ul>
您可能会猜到这不起作用……但为什么呢?无论如何,它都会显示所有资源。
提前致谢!
I have a TV "Tags", comma separated… the usual stuff. Now I want to show only resources with 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!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
这只是一个错字:
按预期工作。它必须是
tvFilters
而不是tvFilter
。It was just a typo:
Works as expected. It must be
tvFilters
instead oftvFilter
.我猜测它可能与
&tvFilter='tags==rundfunk'
有关,并且标签看起来像这样ahfunk, beefunk, redfunk
标签会包含redfunk
但不会==redfunk
你尝试过使用
where
吗?我只看到它带有 = 子句,但您可能有更多选择。I'm guessing that it may have something to do with
&tvFilter='tags==rundfunk'
and tags looking something like thisahfunk, beefunk, redfunk
the tag would includeredfunk
but would not==redfunk
have you tried using
where
? I only see it with the = clause, but you might have more choice there.