Module Description
Overview Classy paragraphs ships a new field type "Class list" which allows an editor to apply a selected class to paragraphs via a drop-down list.

Installation Drupal 7
- Enable Classy paragraphs - Add "Class list" field to desired paragraph type - Defines classes by implementing the the hook_classy_paragraphs_list_options hook.

Optional: - Install classy_paragraphs_ui to manage classes from a user interface. Thanks go to Mark Breneman for writing this useful module.

Drupal 9
- Enable Classy paragraphs - Go to admin/structure/classy_paragraphs_style and create a style. - Create a reference field and target "classy paragraphs style." - Select style and the classes should appear.

How It Works Drupal 7
This module allows an editor to select a class, via a drop-down list, which is added to the paragraph template.

The class is added to the template via the classy_paragraphs_preprocess_entity preprocess function. In this function we use classy_paragraphs_get_class to pull out the selected class from the paragraph_item entity. Once we have a class, then we add it to the template using $variables['classes_array'].

Drupal 9
We've refactored the module so it uses Drupal 8's new config entity. By doing this we can export CSS classes (called styles), we get a UI to manage the classes and NO MORE hooks. Also, you can add multiple classes to a single style.

NOTE: The module won't work if you're using Display Suite or Panelizer to configure the paragraphs. Integration will come later.

Requirements
* Paragraphs

Upgrades While this modules is in alpha, there will be no database upgrade support.

Demo Check out our Paragraphs demo site to see this module in action.

πŸ‡ΊπŸ‡¦ This module is maintained by Ukrainian developers. Please consider supporting Ukraine in a fight for their freedom and safety of Europe.
Project Usage
9919
Creation Date
Changed Date
Security Covered
Covered By Security Advisory
Version Available
Production
Module Summary
This module solves the problem of allowing editors to easily select and apply CSS classes to paragraphs via a drop-down list, improving the styling and customization options for Drupal websites.
Data Name
classy_paragraphs

OPENAI CHATBOT

OPENAI CHATBOT

09:25:34
Generic Chatbot
Hi, I'm a Drupal module expert powered by OpenAI, answering your questions about the Drupal module ecosystem. How can I be helpful today? Please note that we will log your question.