Closed (duplicate)
Project:
Drupal core
Version:
8.8.x-dev
Component:
layout_builder.module
Priority:
Normal
Category:
Task
Assigned:
Reporter:
Created:
17 Jul 2018 at 18:52 UTC
Updated:
11 Mar 2019 at 19:16 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
phenaproximaI think this should be done using the context system, as in #2976148: Layout-based entity rendering should delegate to the correct section storage instead of hardcoding to either defaults or overrides. I will roll a patch based on that work.
The idea here is that, given N section storage plugins, you have to find one that will accept an entity and derive a list of sections from it. "Which plugin to use, given this entity" is a perfect use case for contexts. So to load sections from an entity, it would be something like this:
We could add a utility method to SectionStorageManagerInterface to streamline this (something like loadFromEntity()).
Comment #3
tim.plunkettPostponing this, but here's a patch built on the other issue.
Comment #4
damienmckennaNow that #2976148: Layout-based entity rendering should delegate to the correct section storage instead of hardcoding to either defaults or overrides has been committed, this can be worked on.
Comment #6
tim.plunkettMarking this as a duplicate