From 7e6c1aed84c398dc8e29d053d26dee5c95376d1e Mon Sep 17 00:00:00 2001 From: Luke Towers Date: Wed, 18 Sep 2019 18:27:18 -0600 Subject: [PATCH] Added ability to specify a LESS file to be used as a default backend brand CSS override with the config item "brand.customLessPath" --- modules/backend/models/BrandSetting.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/modules/backend/models/BrandSetting.php b/modules/backend/models/BrandSetting.php index 10821fd0e..bdd20bd22 100644 --- a/modules/backend/models/BrandSetting.php +++ b/modules/backend/models/BrandSetting.php @@ -80,6 +80,12 @@ class BrandSetting extends Model $this->secondary_color = $config->get('brand.secondaryColor', self::SECONDARY_COLOR); $this->accent_color = $config->get('brand.accentColor', self::ACCENT_COLOR); $this->menu_mode = $config->get('brand.menuMode', self::INLINE_MENU); + + // Attempt to load custom CSS + $brandCssPath = File::symbolizePath(Config::get('brand.customLessPath')); + if ($brandCssPath && File::exists($brandCssPath)) { + $this->custom_css = File::get($brandCssPath); + } } public function afterSave()