hiqdev / yii2-thememanager
Pluggable themes for Yii2
Package info
github.com/hiqdev/yii2-thememanager
Type:yii2-extension
pkg:composer/hiqdev/yii2-thememanager
Requires
Requires (Dev)
- hiqdev/hidev-hiqdev: <2.0
- hiqdev/hidev-php: <2.0
Suggests
None
Provides
None
Conflicts
None
Replaces
None
README
Pluggable themes for Yii2
This Yii2 plugin provides easy theming for Yii2 projects.
And allows to create and use themes as composer packages.
So changing a theme on a site becomes as simple as changing
a single require line in composer.json.
At the moment there are several themes available:
- AdminLte - yii2-theme-adminlte
- Agency - yii2-theme-agency
- DataServ - yii2-theme-dataserv
- Flat - yii2-theme-flat
- Hyde - yii2-theme-hyde
- Obaju - yii2-theme-obaju
- Yii2 original - yii2-theme-original
- Sailor - yii2-theme-sailor
- Twenty Fifteen - yii2-theme-twentyfifteen
Installation
This package is not intended to be required directly in your project. Instead you should require theme(s) you've chosen and this package will get required as a dependency.
Please see hiqdev/hisite-template as example of project using this theming library.
Idea
The main goal of this theming library is to allow creation and use of easy
pluggable themes: to change a theme on a site it is enough just to require
other theme package in project's composer.json.
To achieve this goal several technologies were used:
- Yii2 theming with
pathMapauto assembling; - Yii2 dependency injection for widgets and menus;
- composer-config-plugin to create themes as plugins i.e. code combined and distributed together with configuration.
This package provides:
- bootrstrappable
ThemeManagercomponent that collects and setups in application view properThemeobject with properpathMap; - widgets and menus that can be configured through params and substituted with DI;
- theme
DebugPanelshowing actualpathMap.
Configuration
This extension is supposed to be used with composer-config-plugin.
Also you can use it usual way by copy-pasting config. See src/config/web.php for configuration example.
Available configuration parameters:
themeManager.defaultTheme- default themecopyright.year- CopyrightYears widgetcopyright.yearslogo.url- LogoLink widgetlogo.namelogo.optionslogo.imagelogo.imageOptionslogo.smallImagelogo.smallImageOptionsorganization.url- OrganizationLink widgetorganization.nameorganization.optionspoweredBy.url- PoweredBy widgetpoweredBy.namepoweredBy.versionpoweredBy.optionssocialLinks.links- SocialLinks widget
For more details please see src/config/params.php.
License
This project is released under the terms of the BSD-3-Clause license. Read more here.
Copyright © 2015-2017, HiQDev (http://hiqdev.com/)