Skip to main content
drupalreleases
Release: Cms 2.2.3 — Update released for Drupal core (2.2.3)! Release: Easy Breadcrumb 2.0.11 — Minor update available for module easy_breadcrumb (2.0.11). Release: Bootstrap 8.x-3.42 — Minor update available for theme bootstrap (8.x-3.42). Release: Editoria11y Accessibility Checker 3.0.10 — Minor update available for module editoria11y (3.0.10). Release: Editoria11y Accessibility Checker 2.2.24 — Minor update available for module editoria11y (2.2.24). Release: Leaflet 10.4.13 — Minor update available for module leaflet (10.4.13). Release: Flag 5.1.1 — Minor update available for module flag (5.1.1). Release: Layout Paragraphs 3.0.0-beta5 — New beta version released for module layout_paragraphs (3.0.0-beta5). Module Revived: Bootstrap 8.x-3.41 — Theme bootstrap updated after 6 months of inactivity (8.x-3.41). Security Coverage: Component Library — Module component_library now has official Drupal security advisory coverage.

Layout Paragraphs Theme Extension

25 sites No security coverage Drupal 11 · not 10
View on drupal.org

This module enables the Layout Paragraphs builder to use templates and libraries from your site's default theme. It allows you to load paragraph templates and integrate theme styles and scripts into the builder for a more consistent editing experience. The module also supports loading additional templates like node teasers and custom blocks.

Layout Paragraphs Theme Extension

This module extends the Layout Paragraphs module to allow loading templates and libraries from the site's default theme directly into the Layout Paragraphs builder.

This is based on the community patch from issue #3208180.

Features

  • Template Loading: Automatically pulls paragraph.html.twig and paragraph--[type].html.twig templates from the default theme to be used in the Layout Paragraphs editor.
  • Additional Templates: Allows specifying extra templates (e.g., node teasers, custom blocks) to be loaded into the builder.
  • Library Integration: Optionally attaches a CSS/JS library from the default theme to the Layout Paragraphs builder UI for better visual consistency between the editor and the front-end.
  • Drupal Compatibility: Supports Drupal 11 and 12.

Installation

  1. Install the module as you would any other Drupal module.
  2. Ensure you have layout_paragraphs and paragraphs modules installed and configured.

Usage

  1. Navigate to Configuration >Content authoring >Layout Paragraphs >Default Theme (/admin/config/content/layout_paragraphs/default-theme).
  2. Display default theme in admin: Check this to enable the extension.
  3. Default theme library: Enter the machine name of a library from your default theme (e.g., mytheme/layout-paragraphs-editor) to load its styles/scripts in the builder.
  4. Additional templates to load: List any extra template machine names (one per line) that you want the builder to respect from the default theme.
  5. Save configuration.
  6. Clear caches for theme registry changes to take effect.

CSS Scoping Example

When loading theme styles into the Layout Paragraphs builder, it's often necessary to scope them so they only apply to the builder interface and don't conflict with the admin theme's own styles.

The Layout Paragraphs builder is wrapped in the .lp-builder class. You can use this to scope your theme's CSS:

// In your theme's editor-specific SCSS file:
.lp-builder:not(.is-navigating) {
  // Import your theme's base styles, variables, and mixins.
  @import "variables";
  @import "typography";
  @import "common";

  // Override some styles to better fit the builder UI.
  .container {
    max-width: 1200px;
    margin: 0 auto;
  }

  .lpb-layout {
    padding: 0;
  }

  // Hide contextual links inside the builder to avoid clutter.
  .contextual {
    display: none;
  }

  // Ensure paragraphs are visible even if they have overflow issues.
  .paragraph--type--layout {
    overflow: visible;
  }

  // Reset font size if the admin theme overrides it.
  .js-lpb-ui {
    font-size: 1rem;
  }
}

Once you have created your editor-specific CSS/SCSS file, you should define it as a library in your theme's *.libraries.yml and then enter that library's machine name (e.g., mytheme/layout-paragraphs-editor) in this module's configuration form.

Technical Details

The module works by altering the theme registry (hook_theme_registry_alter) to point specific paragraph templates to the versions found in the site's default theme, even when viewing the site through an administration theme. It also uses a pre-render callback on the layout_paragraphs_builder element to attach the configured library.

馃嚭馃嚘

This module is maintained by Ukrainian developers.

Please consider supporting Ukraine in the fight for their freedom and the safety of Europe.

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
7
Tracked since
Apr 2026
Latest release
5 months ago
Releases (12 mo)
7 ▲ from 0
Maintenance
Slowing

Release Timeline

Releases

Version Type Core Release date
1.0.4 Stable 10 Apr 9, 2026
1.1.x-dev Dev 11 Apr 8, 2026
1.1.3 Stable 11 Apr 8, 2026
1.0.3 Stable 10 Apr 8, 2026
1.0.2 Stable 11 Apr 8, 2026
1.0.1 Stable 11 Apr 7, 2026
1.0.x-dev Dev 10 Apr 7, 2026