I've added a variable to the ILIAS core files to have the theme root folder as a variable. This enables me to have included files in the theme where the them can be exported or renamed without consequences.
modified: Services/Init/classes/class.ilInitialisation.php
add new variable LOCATION_STYLESHEET_FOLDER for style sheet root folder
protected static function initHTML:
// load style sheet depending on user's settings
$location_stylesheet = ilUtil::getStyleSheetLocation();
1601: $tpl->setVariable("LOCATION_STYLESHEET",$location_stylesheet);
1602: $tpl->setVariable("LOCATION_STYLESHEET_FOLDER",ilUtil::getStyleSheetLocation("path")); //Added line
modified: Services/Utilities/classes/class.ilUtil.php
added new mode 'path'.
Change line 200 - 208:
if ($mode != "filesystem") {
...
}
return $filename . $vers;
To:if ($mode == "output") {
$vers = str_replace(" ", "-", $ilSetting->get("ilias_version"));
$vers = "?vers=" . str_replace(".", "-", $vers);
// use version from template xml to force reload on changes
$skin = ilStyleDefinition::getSkins()[ilStyleDefinition::getCurrentSkin()];
$vers .= ($skin->getVersion() != '' ? str_replace(".", "-", '-' . $skin->getVersion()) : '');
} else if ($mode == "path") {
$filename = "./Customizing/global/skin/" . ilStyleDefinition::getCurrentSkin() . "/" . $a_css_location;
}
return $filename . $vers;
You can then use {LOCATION_STYLESHEET_FOLDER} in your template files.
If you want to keep these changes with an update then you'll have to merge your code with the updated files when getting the update from git.
Robert