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.
Issue fork external_entities-3568991
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:
- 3568991-rendered-entity-view-mode
changes, plain diff MR !107
Comments
Comment #2
kir lazur commentedComment #4
guignonvThanks! 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?
Comment #6
kir lazur commentedHi, 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.
Comment #7
kir lazur commentedComment #9
guignonvThank 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. ;-)