0

I have two Content Types: Product and Offer.

Offer has a Entity Reference field to Product

I'm making a view with Offers, and I want to get the Product URL in this View. I was trying with Relations but I have no result.

1

You already have the Entity Reference module installed and that is sufficient.

Create a view with base table Offer. Then add a relationship as follows: Click on add relationship, select filter by Entity Reference which will only show the entity referenced endpoints. It will show the field in question from two directions. You are working from the entity that contains a reference to another entity. You therefore select the 'A bridge to the Content entity that is referenced via field_whatver.

This pulls in the related entity. Now you just have to add the new field (URL) to your view and make sure that you set the relationship when you add it to the relationship you defined.

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.