yireo/magento2-theme-by-route
最新稳定版本:1.1.2
Composer 安装命令:
composer require yireo/magento2-theme-by-route
包简介
Assign a specific theme to specific routes
README 文档
README
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"
]
}
]
统计信息
- 总下载量: 270
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: OSL-3.0
- 更新时间: 2025-09-09