mirror of
https://github.com/getnamingo/registry.git
synced 2025-08-05 01:01:30 +02:00
Added the ability to easily customize the control panel logo and documentation pages without overwriting defaults during updates
This commit is contained in:
parent
eac3d77b8c
commit
120ff607dc
11 changed files with 35 additions and 14 deletions
|
@ -121,6 +121,17 @@ $container->set('view', function ($container) {
|
|||
$view->getEnvironment()->addGlobal('uiLang', $uiLang);
|
||||
$view->getEnvironment()->addGlobal('lang', $lang);
|
||||
$view->getEnvironment()->addGlobal('flash', $container->get('flash'));
|
||||
|
||||
$staticDir = '/var/www/cp/public/static';
|
||||
if (file_exists($staticDir . '/logo.svg')) {
|
||||
$logoPath = '/static/logo.svg';
|
||||
} elseif (file_exists($staticDir . '/logo.png')) {
|
||||
$logoPath = '/static/logo.png';
|
||||
} else {
|
||||
$logoPath = '/static/logo.default.svg';
|
||||
}
|
||||
$view->getEnvironment()->addGlobal('logoPath', $logoPath);
|
||||
|
||||
if (isset($_SESSION['_screen_mode'])) {
|
||||
$view->getEnvironment()->addGlobal('screen_mode', $_SESSION['_screen_mode']);
|
||||
} else {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue