I'm using Drupal 7, and this problem have been tormenting me these past few days :
let's say I'm using the basic content type Article, with basic view mode : full and teaser.
Now I'm creating a new content type Magazine, which reference multiple Article (with the module entity reference). On Magazine full view mode, I have set that every Article will be diplayed in teaser and linked to its content.
Easy isn't it ? Everything work fine. Noted that the red block in the sidebar are the same (with contexte module), and as the title.
Now I'm creating another new content type Book, which also reference multiple Article. On Book full view mode, Article are also displayed as teaser linked to its content. And now we have a problem when clicking on a Article from book: the sidebar and the title is from Magazine, and what I need is to display green block and title from Book.
What I get :
What I want :
Is there a way to achieve that ? By contrib or Custom ?
P.S. An article can be referenced in Book, or in Magazine, or both, or neither of them.