Skip to main content
Drupal is a registered trademark of Dries Buytaert
Release: Private content 3.1.0 Minor update available for module private_content (3.1.0). Release: Webform Analysis 2.0.0 Major update available for module webform_analysis (2.0.0). Usage Milestone: Focal Point Module focal_point crossed 1,000 active installs. Release: Ejector Seat 3.0.0 Major update available for module ejectorseat (3.0.0). Release: Ejector Seat 2.0.1 Minor update available for module ejectorseat (2.0.1). Release: Form Style 2.0.1 Minor update available for module form_style (2.0.1). Release: Direct Upload Media Image 1.1.3 Minor update available for module dumi (1.1.3). Release: Changelogify 1.8.1 Minor update available for module changelogify (1.8.1). Release: Block Content Visibility 1.0.0 Initial release available for module block_content_visibility (1.0.0)! Module Revived: Commerce Shipping Order Percentage 1.2.0 Module commerce_shipping_order_percentage updated after 11 months of inactivity...

Theme region wrapper

5 sites No security coverage Drupal 9–11
View on drupal.org

This module allows you to easily configure the HTML element, CSS classes, and WAI-ARIA roles for each theme region directly from the theme's settings page. It provides a user-friendly interface to customize the markup of your regions without needing to edit Twig files.

Overview

Theme region wrapper module provides UI to specify HTML element for theme's each region. You can configure each wrapper element, CSS classes and WAI-ARIA role on a theme settings page.

Motivation

The core views module can change field HTML output with provided UI, and some contribution modules such as Fences and Block Class and so on, also can change HTML output with module provided UI. When you want to change a theme region's wrapper HTML, however cannot change with UI, so need to rewrite the page.html.twig or region.html.twig.

NOTE

This module overrides only a region template which is located in core directory.
If a region uses twig template which is located in custom theme directory,
configured settings for that region does not override anything.

Features

Theme's each region can configure following list items from UI on theme settings page.

  • HTML element
  • CSS class
  • WAI-ARIA role

How to configure a region wrapper settings for a theme?

  1. Go to /admin/appearance.
  2. Click a theme "Settings" link in the installed themes list.
  3. Click "Theme region wrapper settings" header.
  4. Configure each region wrapper output.
  5. Click "Save configuration" button.

Override HTML element settings (advanced)

If you want not to use default HTML element settings, you can override settings.
You want to override the configuration by other module installation, see hook_install() code at this module's testing code.

Depends on

Dependencies of the latest stable release

No dependencies recorded for this project.

Required by

Tracked projects that depend on this one

No tracked projects depend on this one yet.

Activity

Tracked releases
2
Tracked since
Jan 2025
Latest release
1 month ago
Releases (12 mo)
1
Maintenance
Active

Releases

Version Type Core Release date
2.0.x-dev Dev 9–11 Jul 16, 2026
1.0.1 Stable 9–11 Jan 2, 2025