jbennecker/cakephp-admin-theme

Minimalistic Admin Theme for CakePHP

Installs: 167

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 0

Forks: 0

Open Issues: 0

Type:cakephp-plugin

1.0.0 2021-05-28 12:51 UTC

This package is auto-updated.

Last update: 2024-11-11 15:39:33 UTC


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