0

I am creating a view block to be displayed on every page of a specific content-type. Among other things, this view shows a field from that content type. How can I configure the view so that it will only display the field data from the page it is on? Right now it shows the data from every instance of that content-type field. Is there a way to reference the 'parent' page only?

1
  • 1
    You can use the contextual filters option in the advanced section.
    – sareed
    Commented Dec 22, 2014 at 20:38

2 Answers 2

1

You van do this with a contextual filter on your block view.

There is a very gold tutorial located here: http://dannyenglander.com/blog/using-views-contextual-filters-create-related-content-block-drupal-7

If anything is unclear dont hesitate to ask! ;-)

1
  • 1
    Thanks for the example! Using a contextual filter on Content:Nid is exactly what I needed. Commented Dec 22, 2014 at 22:44
0

Add a contextual filter on your block view for Node Id. Then Under "When the filter value is NOT available", select Provide default value and choose in the select list, Content ID from URL.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.