Problem/Motivation

In Views field Rendered entity doesn't have view mode selector. It means that only default view mode will be used.
The main drawback from my point of view is limitation when it comes to building different representations of entity such as: Listing, Product details. Only Default view mode will be used, despite that the entity has different display modes available.

Steps to reproduce

Create view --> add Rendered entity field of any external entity.
Create and assign any view mode to external entity - admin/structure/display-modes/view
Despite different fields setup view rendered entity will use default view mode.

Proposed resolution

Add view mode selection in class RenderedExternalEntity.
Add buildOptionsForm() method.

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

kir lazur created an issue. See original summary.

kir lazur’s picture

Issue summary: View changes

guignonv’s picture

Thanks! I'll have a look and maybe merge if it works for me as well and if it is relevant.

However, on my side, I was already able to select a view mode using the last dev from commit #84d9770cde9c751b89cb0ba81edb0d4044f93912. Did you patch a previous commit and did not happen to try that version? I know it was not working before because the RenderedExternalEntity class was inheriting from FieldPluginBase instead of RenderedEntity. So I moved to RenderedEntity inheritance and it appeared to be working.

So, did you test that commit before?

kir lazur’s picture

Hi, you are right, it seems I did clone of dev branch before the fix you made in the commit you mentioned. Thanks for highlighting.
I'll decline the MR.

kir lazur’s picture

Status: Active » Fixed

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

guignonv’s picture

Thank you for reporting, providing a fix, and taking to have a second look! :-) I appreciate!

PS: I granted you credits for your contribution even if it is not your fix that was kept. ;-)

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.