sdtorresl/materialize-theme

MaterializeTheme plugin for CakePHP

Installs: 20

Dependents: 0

Suggesters: 0

Security: 0

Stars: 1

Watchers: 2

Forks: 0

Open Issues: 0

Language:HTML

Type:cakephp-plugin

dev-master 2020-07-22 04:56 UTC

This package is auto-updated.

Last update: 2024-04-22 13:32:16 UTC


README

This plugin provides easy to use materialize theme in CakePHP 4.x

preview

Prerequisites

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.

Installation

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

Configuration

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');
}

Extending plugin templates

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:

Authors

Sergio Torres

License

This project is licensed under the MIT License - see the LICENSE.md file for details

Support

Have issues? Write to our support mail