Way to display those nodes in a view that are rela

2019-08-31 11:13发布

I have two content types - "Blog" and "News". I am using a reference field to relate blog nodes to news nodes. Now, for the news landing page, I need a block view that displays "Related blogs" i.e. it lists blogs that are related to any news node.

The news landing page is a panel page with a main view that lists all news nodes. The "Related blogs" block will be placed below the main block.

Is there a way to achieve this "Related blogs" block using views?

I am using Drupal7 and I am free to use any module for the relations, apart from references.

1条回答
劫难
2楼-- · 2019-08-31 12:03

Just create a new view, add the reference field as a relationship, and the NID as the contextual filter. Also set the contextual filter to Provide a default value and choose Content ID from URL. The add the block to your news pages.

查看更多
登录 后发表回答