Drupal view of entity referenced fields

356 views Asked by At

For a start the situation is like this. I have two content types:

  1. Problems with field and one multiple value field for Solutions
  2. Solution

I want to make a view that show all solutions based on problem which comes from URL( with title, desc and etc. ). I tried everything. This should be very easy but ...

For now i made a filter content type = problem; Entity reference: solution. Contextual filter: node id based on url; Query: to use distinct.

I get what i need but i cant show description and other fields from the Solution

1

There are 1 answers

0
shaxaaa On

So i found the answear my self and want to share it.

I made a block view for content Solutions. Selected the fields i want to view. Then from Relationships made a Entity Reference: Referencing entity After that i made a new Relationship -> Entity Reference: Solutions and used for it the relationship that i have already made.

Then to filter by id added a Contextual filter for Node ID that is with relationship to the Entity Reference: Referencing entity. To it i made the default value -> get ID from URL