Skip to main content
drupalreleases

Use direct release data with your AI assistant.

Learn more

Theme region wrapper

No security coverage Under active development 3 sites

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.

Drupal 9–11

Ask your assistant about Theme region wrapper

Check compatibility with your Drupal and PHP version, maintenance and security coverage, from current release data. How it works

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
6
Tracked since
Oct 2023
Latest release
2 months ago
Releases (12 mo)
1
Maintenance
Active

Release Timeline

Releases

Version Type Core PHP Release date
2.0.x-dev Dev 9–11 Jul 16, 2026
1.0.1 Stable 9–11 Jan 2, 2025
1.0.0 Stable 9–10 Feb 1, 2024
1.0.0-beta1 Pre-release 9–10 Jan 17, 2024
1.0.0-alpha1 Pre-release 9–10 Nov 1, 2023
1.0.x-dev Dev 9–11 Oct 30, 2023