Drupal is a registered trademark of Dries Buytaert
Protected Pages 3.0.0 Major update available for module protected_pages (3.0.0). Commerce Core 3.3.8 Minor update available for module commerce (3.3.8). Search API HTML Element Filter 1.0.7 Minor update available for module search_api_html_element_filter (1.0.7). Layout Builder Reorder 2.0.1 Minor update available for module layout_builder_reorder (2.0.1). Ban 1.1.0 Minor update available for module ban (1.1.0). Field Formatter Range 2.0.0 Major update available for module field_formatter_range (2.0.0). Field Formatter Range 8.x-1.8 Minor update available for module field_formatter_range (8.x-1.8). Varbase Media Header 9.2.1 Minor update available for module varbase_media_header (9.2.1). Search API Solr 4.3.11 Module search_api_solr updated after 14 months of inactivity (4.3.11). Provus Mega Menu Module provus_mega_menu crossed 1,000 active installs.

This module allows site builders to display different themes on a Drupal site based on defined rules. These rules can consider various conditions like URL patterns, user roles, language, or content types to determine which theme to apply for a specific page.

Description

The Theme Negotiation by Rules module allows a site builder to show pages using different themes based on rules. Each rule contains the theme, and the conditions to be met in order to show the that theme. Conditions are condition plugins, such as page path pattern, current user role, current language or even, the type of the node, when the page is a node canonical page. Meaning that custom conditions may be added by contrib or custom modules, such as Route Condition.

Rules can be ordered by priority. The topmost rule whose conditions are met on a certain context (page, user role, etc) wins, and the page is displayed with the rule's configured theme. Rules can be reordered using drag and drop.

Usage

  • As a site builder, visit the Appearance page and click the Theme rules tab.
  • Use the Add theme rule action button to add new rules.
  • You can disable a rule so that it will be ignored on theme negotiation.
  • A rule with no conditions is also ignored on theme negotiation.

Similar modules

Activity

Total releases
2
First release
Sep 2025
Latest release
4 months ago
Releases (12 mo)
2 ▲ from 0
Maintenance
Active

Releases

Version Type Release date
1.2.1 Stable Feb 24, 2026
1.2.0 Stable Sep 8, 2025