nos86 / cakephp3-material-design
CakePHP 3.x Material Design Theme.
Installs: 22
Dependents: 0
Suggesters: 0
Security: 0
Stars: 2
Watchers: 3
Forks: 1
Open Issues: 0
Language:JavaScript
Type:cakephp-plugin
Requires
- php: >=5.4.16
- cakephp/cakephp: ~3.0
Requires (Dev)
- phpunit/phpunit: ~4.1
This package is not auto-updated.
Last update: 2024-07-07 04:36:40 UTC
README
cakephp3-MaterialDesign
Installation
You can install using composer.
composer require nos86/cakephp3-material-design
Enable Plugin
// config/bootstrap.php Plugin::load('MaterialDesignTheme', ['bootstrap' => true, 'routes' => true]);
Enable theme
// src/Controller/AppController.php public function beforeRender(Event $event) { $this->viewBuilder()->setTheme('MaterialDesignTheme'); }
Enable Form
// src/View/AppView.php public function initialize() { $this->loadHelper('Form', ['className' => 'MaterialDesignTheme.Form']); }
Customize Layout
// src/Controller/AppController.php use Cake\Core\Configure; public function beforeRender(Event $event) { // ... $this->viewBuilder()->setClassName('MaterialDesignTheme.MDB'); }
After you enable the MDBView class in the AppController.php file, you can overwrite any View file, only by creating the Plugin/MDB/
folder inside the Template
folder.
For example, to overwrite the elements files, you must create them as follows:
src/Template/Plugin/MDB/Element/nav-top.ctp
Contributing
- Fork it
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create new Pull Request