Skip to content

Latest commit

 

History

History
44 lines (32 loc) · 576 Bytes

readme.md

File metadata and controls

44 lines (32 loc) · 576 Bytes

CakePHP Admin Theme

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') ?>