Module Description
Layout Paragraphs provides an intuitive drag-and-drop experience for building flexible layouts with paragraphs. The module was designed from the ground up with paragraphs in mind, and works seamlessly with existing paragraph reference fields.
Key Features
* Intuitive drag-and-drop interface.
* Works with existing paragraph reference fields.
* Flexible configuration – site admins choose which paragraphs to use as “layout sections,” and which layouts should be available for each.
* Compatible with Drupal 9.
How it Works
* Provides a new Field Widget and Field Formatter for paragraph reference fields.
* Leverages Drupal’s Layout API for building layouts.
* Uses the paragraphs behaviors API for storing layout data.
Getting Started
* Make sure the Paragraphs module is installed.
* Download/Require (composer require drupal/layout_paragraphs) and install Layout Paragraphs.
* Create a new paragraph type (admin > structure > paragraph types) to use for layout sections. Your new paragraph type can have whatever fields you wish, although no fields are required for the module to work.
* Enable the “Layout Paragraphs” paragraph behavior for your layout section paragraph type, and select one or more layouts you wish to make available.
* Make sure your new layout section paragraph type is selected under “Reference Type” on the content type’s reference field edit screen by clicking “edit” for the respective field on the “Manage fields” tab.
* Choose “Layout Paragraphs” as the field widget type for the desired paragraph reference field under “Manage form display”.
* Choose “Layout Paragraphs” as the field formatter for the desired paragraph reference field under “Manage display”.
* That’s it. Start creating (or editing) content to see the module in action.
Layout Paragraphs vs Layout Builder Layout Paragraphs provides an effortless drag-and-drop editing experience for writers, editors, and marketers. It has been designed from the ground up to meet the needs of people who work with content. Unlike Layout Builder in Drupal core, Layout Paragraphs is not a site building tool. Rather, Layout Paragraphs is an authoring tool. (Also note that Layout Paragraphs is compatible with Layout Builder, meaning both can be installed and used on the same site.)
Key Differences between Layout Paragraphs and Layout Builder
* Layout Paragraphs works with Paragraphs, not Blocks.
* Layout Paragraphs is built on Drupal’s field system. Configuring Layout Paragraphs is as easy as configuring an entity reference field (aka Paragraphs field).
* Layout Paragraphs supports quickly toggling between different layouts within a given section, without having to delete the section.
* Layout Paragraphs supports nested layouts.
* Layout Paragraphs provides a “What You See Is What You Get” authoring experience, especially when configured to use the “Layout Paragraphs Builder” field formatter.
* Because Layout Paragraphs works with entity reference fields, it is extremely flexible and offers a broad range of applications.
* Layout Paragraphs is by design much simpler than Layout Builder, focused entirely on the content entry – or authoring – experience.
* Layout Paragraphs does not support creating templates, site-wide defaults, or default layouts for content types. For these and other site-building needs, Layout Builder is a more appropriate solution.
Note for Themers: Layout Paragraphs works as designed for unaltered Paragraph templates out-of-the-box. However: if you need to customize your paragraph templates, you must adhere to the following requirements for this module to work:
* Your customized paragraph templates must output the attributes variable in the main wrapper HTML attribute. (see paragraph.html.twig for an example).
* Section paragraphs must output content.regions to correctly render layouts (by default this is already output correctly, since the entire content variable is rendered).
* As of #3244654: Add controls and insert buttons using data attributes and Javascript instead of template variables, controls and insert buttons are inserted with Javascript. As long as your template outputs the attributes array correctly, you do not need to worry about outputting specific variables for controls to work.
Versions 2.0.0 Stable
2.0.0 is the most stable, best documented, up-to-date release. Includes automated test coverage for most of the module's functionality.
1.0.0 (deprecated)
Upgrading to 2.0.x is recommended. See Upgrading from 1x to 2x for more information.
Key Features
* Intuitive drag-and-drop interface.
* Works with existing paragraph reference fields.
* Flexible configuration – site admins choose which paragraphs to use as “layout sections,” and which layouts should be available for each.
* Compatible with Drupal 9.
How it Works
* Provides a new Field Widget and Field Formatter for paragraph reference fields.
* Leverages Drupal’s Layout API for building layouts.
* Uses the paragraphs behaviors API for storing layout data.
Getting Started
* Make sure the Paragraphs module is installed.
* Download/Require (composer require drupal/layout_paragraphs) and install Layout Paragraphs.
* Create a new paragraph type (admin > structure > paragraph types) to use for layout sections. Your new paragraph type can have whatever fields you wish, although no fields are required for the module to work.
* Enable the “Layout Paragraphs” paragraph behavior for your layout section paragraph type, and select one or more layouts you wish to make available.
* Make sure your new layout section paragraph type is selected under “Reference Type” on the content type’s reference field edit screen by clicking “edit” for the respective field on the “Manage fields” tab.
* Choose “Layout Paragraphs” as the field widget type for the desired paragraph reference field under “Manage form display”.
* Choose “Layout Paragraphs” as the field formatter for the desired paragraph reference field under “Manage display”.
* That’s it. Start creating (or editing) content to see the module in action.
Layout Paragraphs vs Layout Builder Layout Paragraphs provides an effortless drag-and-drop editing experience for writers, editors, and marketers. It has been designed from the ground up to meet the needs of people who work with content. Unlike Layout Builder in Drupal core, Layout Paragraphs is not a site building tool. Rather, Layout Paragraphs is an authoring tool. (Also note that Layout Paragraphs is compatible with Layout Builder, meaning both can be installed and used on the same site.)
Key Differences between Layout Paragraphs and Layout Builder
* Layout Paragraphs works with Paragraphs, not Blocks.
* Layout Paragraphs is built on Drupal’s field system. Configuring Layout Paragraphs is as easy as configuring an entity reference field (aka Paragraphs field).
* Layout Paragraphs supports quickly toggling between different layouts within a given section, without having to delete the section.
* Layout Paragraphs supports nested layouts.
* Layout Paragraphs provides a “What You See Is What You Get” authoring experience, especially when configured to use the “Layout Paragraphs Builder” field formatter.
* Because Layout Paragraphs works with entity reference fields, it is extremely flexible and offers a broad range of applications.
* Layout Paragraphs is by design much simpler than Layout Builder, focused entirely on the content entry – or authoring – experience.
* Layout Paragraphs does not support creating templates, site-wide defaults, or default layouts for content types. For these and other site-building needs, Layout Builder is a more appropriate solution.
Note for Themers: Layout Paragraphs works as designed for unaltered Paragraph templates out-of-the-box. However: if you need to customize your paragraph templates, you must adhere to the following requirements for this module to work:
* Your customized paragraph templates must output the attributes variable in the main wrapper HTML attribute. (see paragraph.html.twig for an example).
* Section paragraphs must output content.regions to correctly render layouts (by default this is already output correctly, since the entire content variable is rendered).
* As of #3244654: Add controls and insert buttons using data attributes and Javascript instead of template variables, controls and insert buttons are inserted with Javascript. As long as your template outputs the attributes array correctly, you do not need to worry about outputting specific variables for controls to work.
Versions 2.0.0 Stable
2.0.0 is the most stable, best documented, up-to-date release. Includes automated test coverage for most of the module's functionality.
1.0.0 (deprecated)
Upgrading to 2.0.x is recommended. See Upgrading from 1x to 2x for more information.
Module Link
Project Usage
6390
Security Covered
Covered By Security Advisory
Version Available
Production
Module Summary
Layout Paragraphs module aims to provide an intuitive drag-and-drop experience for building flexible layouts with paragraphs, seamlessly working with existing paragraph reference fields in Drupal 9.
Data Name
layout_paragraphs