Skip to content

nos86/cakephp3-material-design

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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:

  1. src/Template/Plugin/MDB/Element/nav-top.ctp

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published