This plugin provides easy to use materialize theme in CakePHP 4.x
A complete CakePHP environment is required for this proyect.
In this repository you can deploy a clean environment with all dependencies ready for develop CakePHP applications.
You can install this plugin into your CakePHP application using composer.
The recommended way to install composer packages is:
composer require sdtorresl/materialize-theme:dev-master
Load the plugin in your src/Application.php
file (bootsrap()
method):
$this->addPlugin('MaterializeTheme');
To set the default bake template add the follow lines to config/bootstrap.php
:
Configure::write('Bake.theme', 'MaterializeTheme');
To set the default layout in AppController
add the follow method:
use Cake\Event\EventInterface;
[...]
public function beforeRender(EventInterface $event) {
parent::beforeRender($event);
$this->viewBuilder()->setLayout('MaterializeTheme.materialize');
}
If you need to extend the templates follow the next steps:
cd APP_HOME
mkdir -p templates/plugin/sdtorresl/materialize-theme
cp -r vendor/sdtorresl/materialize-theme/templates/ templates/plugin/sdtorresl/materialize-theme/
More info related with overriding is available here:
This project is licensed under the MIT License - see the LICENSE.md file for details
Have issues? Write to our support mail