Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一个自定义字段 (field_locations),其中列出了 20 个不同的位置。我想使用该字段作为参数来获取列出相似/相关位置的块视图。
关于如何构建论点的任何想法?
在您的视图上为 field_locations 创建一个上下文过滤器。使用 PHP 代码设置过滤器以提供默认值。在过滤器的 PHP 代码中,获取并返回您的字段或分类术语的值。