This project is not covered by Drupal’s security advisory policy.

This module adds a new Paragraphs Field Formatter that wraps multiple paragraphs in a div, based on a specific field value.

HOW TO USE

Create a "list_field" type field and add options
field_bg_color
Options:
bg_black|bg-black
bg_red|bg-red

Add the Formatter to your paragraphs field and select field_bg_color for the wrapping field.

Add the created field to paragraphs.

Go to your paragraphs and select the same value (ie bg-black) on the paragraphs you wish to wrap. (obviously paragraphs should be in a row)

Check the frontend :) Paragraphs are wrapped in a div named
"pw-group pw-group--bg-black"

This module is based and inspired by Paragraphs theme wrapper

Project information

Releases