Skip to content

Minimalistic Admin Theme for CakePHP

Notifications You must be signed in to change notification settings

brandcom/cakephp-admin-theme

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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