mirror of
https://github.com/Combodo/iTop.git
synced 2026-02-13 07:24:13 +01:00
N°8274 - Add approot to portal's Symfony variables. Allow portal's twig to display images located in /images in twig
This commit is contained in:
@@ -133,6 +133,7 @@ if (!defined('PORTAL_ID'))
|
||||
|
||||
// Env. vars to be used in templates and others
|
||||
$_ENV['COMBODO_CURRENT_ENVIRONMENT'] = utils::GetCurrentEnvironment();
|
||||
$_ENV['COMBODO_APPROOT'] = APPROOT;
|
||||
$_ENV['COMBODO_ABSOLUTE_URL'] = utils::GetAbsoluteUrlAppRoot();
|
||||
$_ENV['COMBODO_CONF_APP_ICON_URL'] = MetaModel::GetConfig()->Get('app_icon_url');
|
||||
$_ENV['COMBODO_MODULES_ABSOLUTE_URL'] = utils::GetAbsoluteUrlModulesRoot();
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
twig:
|
||||
default_path: '%combodo.modules.absolute_path%'
|
||||
paths:
|
||||
'%combodo.approot%images/': ~
|
||||
debug: '%kernel.debug%'
|
||||
strict_variables: '%kernel.debug%'
|
||||
|
||||
|
||||
@@ -27,6 +27,7 @@ parameters:
|
||||
|
||||
# Used in templates
|
||||
combodo.current_environment: '%env(string:COMBODO_CURRENT_ENVIRONMENT)%'
|
||||
combodo.approot: '%env(string:COMBODO_APPROOT)%'
|
||||
combodo.absolute_url: '%env(string:COMBODO_ABSOLUTE_URL)%'
|
||||
combodo.conf.app_icon_url: '%env(string:COMBODO_CONF_APP_ICON_URL)%'
|
||||
combodo.modules.absolute_url: '%env(string:COMBODO_MODULES_ABSOLUTE_URL)%'
|
||||
|
||||
Reference in New Issue
Block a user