https://github.com/brandcom/cakephp-admin-theme
Minimalistic Admin Theme for CakePHP
https://github.com/brandcom/cakephp-admin-theme
Last synced: over 1 year ago
JSON representation
Minimalistic Admin Theme for CakePHP
- Host: GitHub
- URL: https://github.com/brandcom/cakephp-admin-theme
- Owner: brandcom
- Created: 2020-12-15T07:45:15.000Z (over 5 years ago)
- Default Branch: 4.x
- Last Pushed: 2024-03-11T14:19:44.000Z (over 2 years ago)
- Last Synced: 2025-02-22T21:35:24.738Z (over 1 year ago)
- Language: PHP
- Size: 25.4 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
README
# CakePHP Admin Theme
## Installation
```sh
composer require jbennecker/cakephp-admin-theme
```
```sh
bin/cake plugin load AdminTheme
```
Create `config/admin_theme.php`
```php
'',
'AdminTheme.controllers' => [
[],
],
];
```
Set theme e.g in AppController::beforeRender()
```php
if ($this->getRequest()->getParam('prefix') === 'Admin') {
$this->viewBuilder()->setTheme('AdminTheme');
}
```
## ViewBlocks
There are two ViewBlocks
```
= $this->fetch('css'); ?>
```
```
= $this->fetch('script') ?>
```