Skip to main content
drupalreleases

Use direct release data with your AI assistant.

Learn more

Default Paragraphs

Security covered Under active development 798 sites

This module automatically adds predefined paragraph structures to content when a new entity is created. This helps establish a consistent content layout by populating fields with default content based on selected paragraph types. It also allows other modules to modify these default paragraphs before they are added.

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:

  1. Install the module: composer require drupal/default_paragraphs
  2. Create multiple paragraph reference field for a given content type
  3. Make sure you have more than one allowed paragraph type for this field
  4. Go to Manage form display page
  5. Select "Default paragraphs widget"
  6. You can select now the default paragraphs type from the settings form
  7. 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
Drupal 9–11

Ask your assistant about Default Paragraphs

Check compatibility with your Drupal and PHP version, maintenance and security coverage, from current release data. How it works

Depends on

Dependencies of the latest stable release

Required by

Tracked projects that depend on this one

No tracked projects depend on this one yet.

Activity

Tracked releases
4
Tracked since
Aug 2023
Latest release
2 years ago
Releases (12 mo)
0
Maintenance
Dormant

Release Timeline

Releases

Version Type Core PHP Release date
2.0.1 Stable 9–11 Oct 7, 2024
2.0.0 Stable 9–10 Mar 12, 2024
2.x-dev Dev 9–11 Aug 2, 2023
2.0.x-dev Dev 9–10 Aug 2, 2023