schmunk42 / multi-theme
Yii Framework Theme-Manager class, switch themes by regular expressions on controller routes.
Installs: 7 414
Dependents: 1
Suggesters: 0
Security: 0
Stars: 6
Watchers: 3
Forks: 2
Open Issues: 0
Requires
- php: >=5.3.2
- yiisoft/yii: 1.1.*
This package is auto-updated.
Last update: 2024-10-13 01:22:24 UTC
README
Features
Yii Framework Theme-Manager class, switch themes by regular expressions on controller routes.
Download
Get it from github and place it into your application.
or
Via composer: composer.phar require schmunk42/multi-theme
Usage
Configuration Example
'themeManager' => array(
'class' => 'vendor.schmunk42.multi-theme.EMultiThemeManager',
'rules' => array(
'^p3(.*)' => 'backend', // use backend theme for all routes starting with p3
'^user/default/index' => 'frontend', // use frontend theme for several routes of the user module
'^user/login/(.*)' => 'frontend',
'^user/profile/(.*)' => 'frontend',
'^user/registration/(.*)' => 'frontend',
'^user/recovery/(.*)' => 'frontend',
'^user/activation/(.*)' => 'frontend',
'^user/(.*)' => 'backend', // use backend theme for user module
'^rights/(.*)' => 'backend', // use backend theme for rights module
)
),
Note: The first matching rule wins.
Resources
- Fork on github
- View at Yii Extensions
- Phundament Composer Package