diff --git a/application/helpers/hlp_header_helper.php b/application/helpers/hlp_header_helper.php index 27dfba5a1..53a5f5ba3 100644 --- a/application/helpers/hlp_header_helper.php +++ b/application/helpers/hlp_header_helper.php @@ -270,6 +270,28 @@ function absoluteJsImportUrl($relurl) return $url; } +/* + * Generate Css File Include if Extension contains file + * + * @param $relativeFilePath path relative to Extension public/css dir + */ +function generateCSSsIncludeIfExtensionCssExists($relativeFilePath) +{ + $fsiterator = new FilesystemIterator(FHCPATH . 'application/extensions'); + foreach ($fsiterator as $fsitem) + { + if(preg_match('/^FHC-Core-/', $fsitem->getBasename())) + { + $extensionfile = 'public/extensions/' . $fsitem->getBasename() + . '/css/' . $relativeFilePath; + if(is_readable(FHCPATH . $extensionfile)) + { + generateCSSsInclude($extensionfile); + } + } + } +} + /* * Manipulate CI views includes Array to load * - public/js/FhcApps.js via customJSs and diff --git a/application/views/templates/FHC-Header.php b/application/views/templates/FHC-Header.php index 7b53cbf5d..4203aa571 100644 --- a/application/views/templates/FHC-Header.php +++ b/application/views/templates/FHC-Header.php @@ -132,7 +132,11 @@ if ($cis === true) generateCSSsInclude(defined('CIS4') ? 'public/css/cis4.css' : 'public/css/cis_bs5.css'); //Tags - if ($tags === true) generateCSSsInclude('public/css/tags.css'); + if ($tags === true) + { + generateCSSsInclude('public/css/tags.css'); + generateCSSsIncludeIfExtensionCssExists('tags.css'); + } $extapphelper = ExtendableAppsHelper::getInstance(); $extapphelper->init($customCSSs, $customJSs, $customJSModules);