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?
2 Answers
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! ;-)
-
1Thanks for the example! Using a contextual filter on Content:Nid is exactly what I needed. Dec 22, 2014 at 22:44
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.