0

I defined two content types : Book, Quote. A quote has a Book field, an entity reference to the book it is extracted from.

I want to build a block view to be displayed on each Book node page : all the quotes extracted from that book. In other words, all the quotes whose Book field value matches the NID of the current Book node.

So I defined

• a relationship field_book : Content (Content using field_property_book) ;

• a contextual filter : (field_book : Content) Content : Book set

  • to use Relationship = field_book : Content
  • When the filter value is NOT available : Provide a default value = Content ID from the URL (I also tried Raw value from URL + element number 2 : node/NID)

The view block displays no results. Obviously, I missed something about configuring a contextual filter for a block view ! Any ideas ? Help to a newbie with relationship greatly appreciated :-) Thanks.

0

I figured it out: the contextual filter should NOT use the relationship, as the Book field is in the Quote content type!

Finally, this worked: contextual filter (field_book : Content) Content : Book set

Relationship = Do not use any relationship

When the filter value is NOT available : Provide a default value = Content ID from the URL

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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