0

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.

Abhijit
  • 895
  • 5
  • 11
  • How would you like it to evaluate "Related"? – jsheffers Apr 05 '12 at 14:26
  • jsheffers, as I said, at present I have a reference field for relating content, but I am open for other options that may make it easier to build the related content block. – Abhijit Apr 05 '12 at 17:15

1 Answers1

0

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.

jsheffers
  • 1,602
  • 19
  • 41
  • That is the common approach for displaying related content on node pages. However, I am trying to display the related content in a panel page and I need to show blog nodes that are related to any news node. – Abhijit Apr 09 '12 at 05:38
  • Then just remove the contextual filter. If you're using panels just add the custom block you created with the view above to your panel page. – jsheffers Apr 09 '12 at 13:18