jbennecker / cakephp-admin-theme
Minimalistic Admin Theme for CakePHP
Package info
github.com/brandcom/cakephp-admin-theme
Type:cakephp-plugin
pkg:composer/jbennecker/cakephp-admin-theme
1.0.0
2021-05-28 12:51 UTC
Requires
- php: ^7.4 || ^8.0
- cakephp/cakephp: ^4.0
- cakephp/plugin-installer: *
README
Installation
composer require jbennecker/cakephp-admin-theme
bin/cake plugin load AdminTheme
Create config/admin_theme.php
<?php return [ 'AdminTheme.title' => '', 'AdminTheme.controllers' => [ [], ], ];
Set theme e.g in AppController::beforeRender()
if ($this->getRequest()->getParam('prefix') === 'Admin') { $this->viewBuilder()->setTheme('AdminTheme'); }
ViewBlocks
There are two ViewBlocks
<?= $this->fetch('css'); ?>
<?= $this->fetch('script') ?>