I want have cakephp app with 2 part the main site and the admin panel and layout and design of the 2 part are seprate
I created Admin prefix and put my admins controller and template file in Admin folder
I created a folder in webroot named Admin too and put my admin related assets there .
In cakephp config/App.php there is part to specify base url of assets . i's look like this
'App' => [
'namespace' => 'App',
'encoding' => env('APP_ENCODING', 'UTF-8'),
'defaultLocale' => env('APP_DEFAULT_LOCALE', 'en_US'),
'base' => false,
'dir' => 'src',
'webroot' => 'webroot',
'wwwRoot' => WWW_ROOT,
// 'baseUrl' => env('SCRIPT_NAME'),
'fullBaseUrl' => false,
'imageBaseUrl' => '',
'cssBaseUrl' => 'css/',
'jsBaseUrl' => 'js/',
'paths' => [
'plugins' => [ROOT . DS . 'plugins' . DS],
'templates' => [APP . 'Template' . DS],
'locales' => [APP . 'Locale' . DS],
],
],
I'm wondering how can i specify defferent dicrectory for assets for Admin ?
Or how should i call css method in Html helper for admin ?
I load css file in main part of site like this
<?= $this->Html->css('custom.css') ?>
But i have to load it for admin side like this
<?= $this->Html->css('../Admin/css/custom.css') ?>
Is there any way i can fix this and load it like i do the main part ?
I also used it like this but it seems not to recognize prefix option
<?= $this->Html->css('custom.css' , ['prefix'=>'Admin']) ?>