Problem/Motivation
When paragraph template has the id attribute defined and not only containing the number, eg. 'paragraph--ID', layout paragraphs builder control will not appear. Because it is depending on the id attribute to attach control, which is looking for 'ID' alone.
Steps to reproduce
Add paragraph.html.twig, customize to have a paragraph ID.
...
{% set paragraph_id = 'paragraph--' ~ paragraph.id.value %}
<div{{ attributes.addClass(classes).setAttribute('id', paragraph_id) }}>
...
</div>
Proposed resolution
Use the "data-id" attribute.
Remaining tasks
None.
User interface changes
None.
API changes
None.
Data model changes
None.
Comments
Comment #2
ckngComment #4
ckngComment #6
ckngAdditional changes in the LayoutParagraphsBuilder.php needed.
Comment #12
justin2pin commented