Move referenced entitiy related settings into entity formatter with 3rd party settings

Created on 6 July 2021, over 3 years ago
Updated 7 March 2024, 8 months ago

Problem/Motivation

THIS MIGHT NEED TO BE A SEPARATE GENERAL MODULE - NOT SURE YET - BUT IDEA STARTED IN DROWL_PARAGRAPHS AND WOULD BE VERY USEFUL HERE!

In several cases, we're referencing other entities like Media (Slideshows, Video, ...) but want to override settings affecting the referenced entity display.

Currently, we're solving this with hooks in drowl_paragraphs which sets the values on the referenced entities directly. Anyway this is not the most clever solution as

  • The functionality would be more helpful per view-mode of the entity
  • Could be generalized so that you decide per reference, which view-mode specific settings should be overridable per entity be the user or set on the entity reference level or even on the entity display level!
  • Every change to output also affects the cached display of the entity. While Drupal doesn't know about these injected settings like in drowl_media + paragraph => attachments (see "#media" key in drowl_paragraphs_types hooks and media document twig files) so that we have to add each setting to the cache keys. Furthermore we'd have to clear cache tags when the referenced entity is saved changed to prevent us from old cached displays.

=> Lots of potential for generalization and improvements!

For example we could also need it in other referenced entities like media (e.g. slide settings).

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

Feature request
Status

Postponed

Version

1.0

Component

Code

Created by

🇩🇪Germany Anybody Porta Westfalica

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • 🇩🇪Germany Anybody Porta Westfalica

    Moved to _bs for future implementation. Still makes sense, but won't happen in the near future and possibly never in the old drowl_paragraphs

Production build 0.71.5 2024