Default Paragraphs module provides a widget for entity_reference_revisions field types, that allows us to select multiple paragraph types as defaults, so they will be added on the entity add page. it is based on Paragraphs EXPERIMENTAL widget.
The main use case is where we need to have a default content structure for a given entity type.
The paragraph types set as default would be shown as "closed" on entity add page by default, but for the case where given paragraph type has required fields it will be opened.
Default Paragraphs allows other modules to modify the paragraph entities by subscribing for an event called DefaultParagraphsEvents::ADDED. It is triggered right before they are set as default values of the widget. It provides the possibility to set default values to the paragraph entity's fields if needed.
It is useful when we have multiple paragraph reference field.
Usage:
- Install the module:
composer require drupal/default_paragraphs - Create multiple paragraph reference field for a given content type
- Make sure you have more than one allowed paragraph type for this field
- Go to
Manage form displaypage - Select "Default paragraphs widget"
- You can select now the default paragraphs type from the settings form
- When you go to add content page, the paragraph reference field will have the default paragraph entities pre-populated.
Releases
The 2.0.1 release is compatible with the 1.18 version of the Paragraphs module. For older versions of the paragraphs module, stick to 2.0.0
Dependencies:
- Paragraphs
Project information
- Project categories: Content display
956 sites report using this module
- Created by nikolabintev on , updated
Stable releases for this project are covered by the security advisory policy.
Look for the shield icon below.




