Views: displaying related (referenced) content in a block I tried solving the following with "node_reference" and "entityreference" modules but failed.

I have the content types recipe and cook. A recipe has a mandatory field which points to a cook.

When Drupal renders a recipe I want to have a block on the sidebar (implemented via "views") which will be displaying info on the recipe's cook.

How can the block know which recipe is being rendered on screen in order to use the relationship and pull the cook's data as fields which I'll use for display within the block?

thanks

More info: The problem is that in the block I'm getting all referenced (from recipes) cooks and not just the one cook for the specific recipe. So for the following data:

recipe#1 -&gt; cook#1
recipe#2 -&gt; cook#1
recipe#3 -&gt; cook#1
recipe#4 -&gt; cook#2


When I visit any of the recipes the block displays data from:

cook#1
cook#1
cook#1
cook#2
You would need to add a relationship from the reference field in views (under advanced > relationships). This will extend the scope of fields available to the view include those of the referenced node (Cook).

However this will as you state show all cooks as it will come from all recipes. In order for the block to know how to filter out all irrelevant cooks (ones not referenced) you will need a contextual filter which knows what recipe you are currently on. 

On this contextual filter you can specify the relationship to the one you have already created, then you will need to let the block view know which recipe you are on. You do this with the setting "provide default value" and "Content ID from URL". This will tell the view which content you are on and hopefully apply the filter. Sorry I do not have access to D7 right now for a better explanation