adaptdk / er_viewmode

Allows selection of viewmode per referenced entity
3 stars 4 forks source link

8.x 1.x #3

Closed paul-mckibben closed 9 years ago

paul-mckibben commented 9 years ago

Drupal 8 version of er_viewmode module

lslinnet commented 9 years ago

I have been looking at what possibilities Drupal 8 is currently offering in regards to extending and modifying existing fields and indeed there seem to be an opinion that the current correct approach is to create new fieldtypes (widgets and formatters).

I would however not see this information as a new field type it is more of an enrichment of existing data, an addition of value added to the existing reference field - in which case it would make sense to have a way to extend the entity_reference field with additional reference based information. I remember having heard about an idea of having fields on fields in Drupal 8 –but haven't been able to find any reference to it by searching– and that is really the approach I see as the correct to use data model wise, allowing one field to contain multiple values being extensible and allowing enrichment of the reference between entities. The main Idea from D7 was to be able to extend existing entityreference fields with the meta data option of changing viewmode, with this approach we kinda lose that ability - which of course is a shame but shouldn't hold us back from actually releasing this approach to solving the issue at hand.

On a more sad note, I will not be able to take it for a spin before later this week, currently I am tied up preparing a talk on D8 and arranging a new Drupalhagen event.