- Issue created by @pdureau
- π«π·France G4MBINI BΓ¨gles
ComponentLayout with layout_paragraphs is working off-the-shelf.
Tested with UI Suite DaisyUI as follows:
- Create a paragraphs called section
- Check the Layout Paragraphs behaviour
- Pick layouts from all component layouts provided by UI Patterns
- Save
- Create some classic paragraphs (without checking the Layout Paragraphs behaviour)
- Configure the display for each classic paragraphs
- Edit Basic page content type
- Add a Paragraphs field and check Section paragraphs and classic Paragraphs available for the field
- Goto Manage Form Display and choose Layout Paragraphs widget for the Paragraphs field
- Goto Manage Display and choose Layout Paragraphs format for the Paragraphs field
- Eventually create a Basic Page node
- Add a section Paragraphs from one of the layout chosen
- Inside each region you can add classic Pargraphs instance
What could be very kool in the node edit would to have CSS from front loaded inside the Paragraphs field.
There is an issue about that there : https://www.drupal.org/project/layout_paragraphs/issues/3208180 β¨ Provide frontend editing experience for Layout Paragraphs. Active
- Issue was unassigned.
- Status changed to Fixed
4 months ago 10:44am 24 November 2024 Automatically closed - issue fixed for 2 weeks with no activity.
- π«π·France fschaff
Hi,
I'm trying to create a custom layout component available in layout_paragraph.
Starting from something simple :name: Section description: "Section test" group: Layouts slots: col_1: title: Colonne 1 col_2: title: Colonne 2
I can't get the attribute classes for the regions
Is there anything I can pass to the twig or configure in the yml?
Thanks - π«π·France just_like_good_vibes PARIS
Hello,
you need to create props to store attributes for each section.
in the component definition, with $ref: ui-patterns://attributesyou can then use them in twig
- π«π·France fschaff
Thanks,
I have now this:name: Section description: "Section test" group: Layouts slots: col_1: title: Colonne 1 col_2: title: Colonne 2 props: type: object properties: attributes: $ref: ui-patterns://attributes col_1_attributes: $ref: ui-patterns://attributes col_2_attributes: $ref: ui-patterns://attributes
and this:
<div{{ attributes.addClass('section') }}> <div{{ col_1_attributes.addClass('col_1') }}> {{ col_1 }} </div> <div{{ col_2_attributes.addClass('col_2') }}> {{ col_2 }} </div> </div>
But the col_1_attributes and col_2_attributes are emptyβ¦
Do I miss something?