The Home for Magento 2 Excellence

Quality-tested Magento 2 modules. Explore. Evaluate. Elevate. #magento2

1090 Modules
617 Ready
473 Need Help
🏆 Leaderboard
Stable v1.1.2

Yireo ThemeByRoute for Magento 2

yireo/magento2-theme-by-route

Loads a specific theme per route based on an app/etc/theme-by-route.json file, with advanced per-website and per-store scope rules for fine-grained theme selection.

438
Downloads
Below average
2
GitHub Stars
Below average
7mo ago
Last Release
0
Open Issues
Build Passing
Ready to install

Build Tests

Composer Install
DI Compile
Templates

Code Quality

CS Coding Standard
12 warnings
L3 PHPStan

Tested on Magento 2.4.9

Recent Test History

Each release is tested against the latest Magento version at that time.

v1.1.2 on Magento 2.4.9
Jun 1, 2026

Share This Module's Status

Yireo ThemeByRoute for Magento 2 Magento compatibility status badge

README

Loaded from GitHub

Yireo_ThemeByRoute

Magento 2 module to allow a file app/etc/theme-by-route.json to determine which theme needs to be loaded for which route.

Installation

composer require yireo/magento2-theme-by-route
bin/magento module:enable Yireo_ThemeByRoute

Configuration

Create a file app/etc/theme-by-route.json similar to the following:

{
  "Loki/luma": [
    "cms/index/index"
  ]
}

Now, the Loki/luma theme is applied to all pages.

If you want to control under which circumstances which theme is applied, there is an advanced syntax as well:

[
  {
    "scope_type": "website",
    "scope_code": "default",
    "theme": "Loki/luma",
    "pages": [
      "cms/index/index"
    ]
  }
]

This content is fetched directly from the module's GitHub repository. We are not the authors of this content and take no responsibility for its accuracy, completeness, or any consequences arising from its use.