mirror of
https://github.com/getgrav/grav.git
synced 2025-02-20 19:56:53 +01:00
Fix fixed path in theme_url Twig variable
This commit is contained in:
parent
6e39107d45
commit
7f526cea76
|
|
@ -17,14 +17,16 @@ define('ASSETS_DIR', ROOT_DIR . 'assets/');
|
|||
define('CACHE_DIR', ROOT_DIR . 'cache/');
|
||||
define('IMAGES_DIR', ROOT_DIR . 'images/');
|
||||
define('LOG_DIR', ROOT_DIR .'logs/');
|
||||
define('VENDOR_DIR', ROOT_DIR .'vendor/');
|
||||
define('LIB_DIR', SYSTEM_DIR .'src/');
|
||||
define('ACCOUNTS_DIR', USER_DIR .'accounts/');
|
||||
define('DATA_DIR', USER_DIR .'data/');
|
||||
define('PAGES_DIR', USER_DIR .'pages/');
|
||||
|
||||
// DEPRECATED: Do not use!
|
||||
define('DATA_DIR', USER_DIR .'data/');
|
||||
define('LIB_DIR', SYSTEM_DIR .'src/');
|
||||
define('PLUGINS_DIR', USER_DIR .'plugins/');
|
||||
define('THEMES_DIR', USER_DIR .'themes/');
|
||||
define('VENDOR_DIR', ROOT_DIR .'vendor/');
|
||||
// END DEPRECATED
|
||||
|
||||
// Some extensions
|
||||
define('CONTENT_EXT', '.md');
|
||||
|
|
|
|||
|
|
@ -125,9 +125,6 @@ class Twig
|
|||
|
||||
$this->grav->fireEvent('onTwigExtensions');
|
||||
|
||||
$theme = $config->get('system.pages.theme');
|
||||
$themeUrl = $this->grav['base_url'] .'/'. USER_PATH . basename(THEMES_DIR) .'/'. $theme;
|
||||
|
||||
// Set some standard variables for twig
|
||||
$this->twig_vars = array(
|
||||
'grav' => $this->grav,
|
||||
|
|
@ -138,7 +135,7 @@ class Twig
|
|||
'base_url_absolute' => $this->grav['base_url_absolute'],
|
||||
'base_url_relative' => $this->grav['base_url_relative'],
|
||||
'theme_dir' => $locator->findResource('theme://'),
|
||||
'theme_url' => $themeUrl,
|
||||
'theme_url' => $this->grav['base_url'] .'/'. $locator->findResource('theme://', false),
|
||||
'site' => $config->get('site'),
|
||||
'assets' => $this->grav['assets'],
|
||||
'taxonomy' => $this->grav['taxonomy'],
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user