Closed (fixed)
Project:
Decoupled Layout Builder Pitchburgh Packages
Component:
Code
Priority:
Normal
Category:
Task
Assigned:
Reporter:
Created:
19 Jul 2023 at 04:44 UTC
Updated:
15 Nov 2023 at 02:34 UTC
Jump to comment: Most recent
Layout builder relies on the Layout Discovery module.
This provides a plugin system that provides metadata about layout plugins.
Each layout plugin comprises sections and a theme hook (Twig template).
The Twig template contains the markup and arrangement of the sections in the layout.
We can use the metadata from the Layout plugin definition as important metadata for the decoupled approach, but we still need a React version of the Twig template.
Create a simple layout registry and registration process for layout plugins. Create an MVP of some common layout plugins:
Out of scope but for future consideration:
Comments
Comment #2
griffynh commentedComment #3
griffynh commentedComment #4
griffynh commentedComment #5
larowlanLayouts need to be implemented like so https://project.pages.drupalcode.org/decoupled_lb/?path=/docs/developmen...
Plugins can be associated with a component by adding an entry to the plugin definition with keys 'componentPath' which points to the transpiled JS file and an optional 'library' key if any CSS needs to also be added to the page.
Example https://git.drupalcode.org/project/decoupled_lb_api/-/blob/1.x/decoupled...