robertgarrigos's picture

I have three content types related to each other in this way:

  1. Provider: has a town single field as entity reference 
  2. Town: the middle entity
  3. Service: has a town single field as entity reference

I want to have a view which lists all the services connected to a provider through the town's relationship. The view would have a nid context filter with as provider. I cannot see the way to accomplish this, but I'm sure it can be done.

Accepted answer

Ah finally:

contextual filter as nid, no relationship

first relation: A bridge to the Content entity that is referenced via field_town

second relation: A bridge to the Content entity that is referencing Content via field_town, with a relationship to the first relation

a field in the view with a relationship to the second relation

a filter by node type = service, with a relationship to the second relation

Comments

robertgarrigos's picture

Ah finally:

contextual filter as nid, no relationship

first relation: A bridge to the Content entity that is referenced via field_town

second relation: A bridge to the Content entity that is referencing Content via field_town, with a relationship to the first relation

a field in the view with a relationship to the second relation

a filter by node type = service, with a relationship to the second relation