0
votes

What I need to happen is this: I have a 'page' content type on which I can select a testimonial content type to be displayed as a block. Each 'page' can have a different testimonial.

So my 'page' has a testimonial field (field_testimonial) which is of type 'entity reference' and autocompletes from the entity selection of "testimonial" content types.

So now, when I create my new 'page' I type to content and type the testimonial I want and that page should pull through the selected testimonial.

I configured a block view to handle this process with the following Advanced settings:

Relationships:

Entity Reference: Referenced Entity A bridge to the Content entity that is referenced via field_testimonial

This doesn't work! I've even tried the reverse relationship as i've only two to choose from: Entity Reference: Referencing entity A bridge to the Content entity that is referencing Content via field_testimonial

and this doesn't work either.

Can anybody offer any advice? I feel I'm close but just missing the final nugget.

Please help.

1

1 Answers

0
votes

As I understand you just have a field in your 'page' content type which is an entity reference limited to select any node of 'testimonial' content type. And you want to display a block in 'page' nodes' detail pages. This block must have a filter, provided by 'field_testimonial' from current page node.

If so you don't need to set reference but to set a contextual filter instead. You just have to choose your 'field_testimonial'. Also configure your block to be shown only on 'page' nodes pages.

References must be used in case you want to show some content from referenced entities and not in case you want to filter view output.