The Drupal 8+ Paragraphs module is a complete rewrite of the D7 module. Although based on the Entity Reference module in core, Paragraphs requires the Entity Reference Revisions module .
The Drupal Paragraphs module can make processes like these much more manageable for non-technical users while also giving developers the ability to control the formatting and appearance of such specially formatted elements at the theme level.
In practice, Paragraphs allows us to insert elements much like content fields, but instead of adding these around the body of any given piece of content, they are effectually inserted throughout the body.
Paragraphs defines
- A selection method for the Entity Reference field
- A widget for the Entity Reference Revisions field
- Paragraph types
Features
This module has some overlapping functionality with field_collection, but this module has some advantages over field_collection.
- Different fields per paragraph bundle
- Using different paragraph bundles in a single paragraph field
- Displays per paragraph bundle
- Bundles are exportable with features.
- Entities, so: exportable field bases/instances, usable in Search API, usable in View
- paragraph--[type]--[view-mode].html.twig (e.g. paragraph--image--default.html.twig)
- paragraph--[type].html.twig (e.g. paragraph--image.html.twig)
- paragraph--[view-mode].html.twig (e.g. paragraph--default.html.twig)
- paragraph.html.twig
No comments:
Post a Comment