简体   繁体   English

drupal 8上下文过滤器

[英]drupal 8 contextual filter

I have 2 content types "lab" and "member". 我有2种内容类型“实验室”和“成员”。 When I display "lab" data, I want to display "member" from this lab. 当我显示“实验室”数据时,我想显示此实验室中的“成员”。

I defined a contextual filter in a display "entity reference list" of a view, which run in preview. 我在视图的显示“实体引用列表”中定义了上下文过滤器,该过滤器在预览中运行。

I defined a reference field in "lab", which "reference method" is the above "entity reference list". 我在“实验室”中定义了一个参考字段,该“参考方法”是上面的“实体参考列表”。 But about the views arguments which have to passed to the views? 但是关于必须传递给视图的视图参数呢?

Regards, E. Cocquebert 此致,E. Cocquebert

I succedded to have what I wanted. 我成功拥有了我想要的东西。

It was not a "entity reference" display but a "block" display. 它不是“实体引用”显示,而是“阻止”显示。

"entity reference" is to help to fill the form display “实体参考”是为了帮助填写表格显示

"block" is to display result of the contextual filter when display a specific node (in my case). “块”是在显示特定节点时显示上下文过滤器的结果(在我的情况下)。

Regards, E. Cocquebert 此致,E. Cocquebert

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 日期的Drupal 8上下文过滤器 - Drupal 8 contextual filter for date Drupal 8-忽略上下文过滤器 - Drupal 8 - Ignore contextual filter Drupal 8 基于当前用户的上下文过滤器 - Drupal 8 Contextual Filter Based Upon Current User Drupal 8视图:忽略管理员角色的上下文过滤器 - Drupal 8 Views: Ignore a contextual filter for admin role Drupal 8使用产品类型和分类术语查看上下文过滤器 - Drupal 8 views contextual filter using product type and a taxonomy term 在 Drupal 8 的视图块中使用 Content ID 上下文过滤器 - Using a Content ID Contextual Filter in a Views Block in Drupal 8 Drupal 8中上下文链接图标旁边的新设置项 - New settings item next to contextual link icon in drupal 8 为什么在Drupal 8中为guest虚拟机显示data-contextual-id? - Why is data-contextual-id showing for guests in Drupal 8? 我们如何使用两个上下文过滤器,因为当我使用两个上下文过滤器时,它仅从第一个过滤器过滤第二个上下文过滤器被忽略 - How do we use two contextual filter because when i use two contextual filter it only filter from first filter second contextual filter is ignored 以编程方式向已使用上下文过滤器的视图添加参数 - Programmatically add an argument to a view that already uses a contextual filter
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM