Problem/Motivation
I suggest supporting adding inline blocks in the predefined layouts, so when creating a new node using this layout it will automatically create a clone for the existing inline blocks in the layout.
Steps to reproduce
1- Create a custom block called accordion.
2- Create a custom block called accordion section.
3- Add entity reference field to the accordion block to reference the accordion section block.
4- Create a new layout from layout library.
5- Add an accordion block to a section.
6- Create a node with the created layout.
7- It will create the accordion block but it will keep using the original accordion sections (inline-block) that are used in the layout.
Proposed resolution
I suggest updating the event subscriber to clone the section deeply with any inline blocks used in it.
Remaining tasks
User interface changes
API changes
Data model changes
| Comment | File | Size | Author |
|---|---|---|---|
| #9 | 3273160-9.patch | 10.86 KB | qusai taha |
Issue fork layout_library-3273160
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:
Comments
Comment #3
odai atiehTested only for inline blocks, and need testing for paragraphs.
Comment #4
rajab natshahComment #5
larowlanWe'd want some tests here, thanks
Comment #7
qusai taha commentedFix clone issue Custom block content with entity reference revision
Comment #9
qusai taha commentedComment #10
rajab natshah