From 9d270d6a6b3c271918dcb9748b1c414e833d76aa Mon Sep 17 00:00:00 2001
From: Kathrin Osswald <kathrin.osswald@uni-ulm.de>
Date: Mon, 5 Oct 2020 10:00:40 +0200
Subject: [PATCH] Fixed bug that setting addablockposition was not applied to
 Boost Campus Child.

---
 CHANGES.md |  1 +
 config.php | 16 +++++++++++++++-
 2 files changed, 16 insertions(+), 1 deletion(-)

diff --git a/CHANGES.md b/CHANGES.md
index 0b0b750..13ede38 100644
--- a/CHANGES.md
+++ b/CHANGES.md
@@ -6,6 +6,7 @@ Changes
 
 ### Unreleased
 
+* 2020-10-05 - Fixed bug that setting addablockposition was not applied to Boost Campus Child.
 * 2020-09-24 - Fixed bug that theme Boost Campus Child did not show the favicon set in parent theme Boost Campus.
 * 2020-06-09 - Improved SCSS settings to be used with admin_setting_scsscode that validates the code before saving.
 
diff --git a/config.php b/config.php
index caa754c..58f3b9a 100644
--- a/config.php
+++ b/config.php
@@ -36,4 +36,18 @@ $THEME->prescsscallback = 'theme_boost_campus_child_get_pre_scss';
 $THEME->yuicssmodules = array();
 $THEME->rendererfactory = 'theme_overridden_renderer_factory';
 $THEME->requiredblocks = ' ';
-$THEME->addblockposition = BLOCK_ADDBLOCK_POSITION_DEFAULT;
+
+// MODIFICATION START:
+// Apply the setting from parent theme Boost Campus to define where the
+// add a block widget is placed.
+
+// Get the config from parent theme boost_campus.
+if (get_config('theme_boost_campus', 'addablockposition') == 'positionnavdrawer') {
+    $THEME->addblockposition = BLOCK_ADDBLOCK_POSITION_FLATNAV;
+} else {
+    $THEME->addblockposition = BLOCK_ADDBLOCK_POSITION_DEFAULT;
+}
+// MODIFCATION END.
+/* ORIGINAL START.
+THEME->addblockposition = BLOCK_ADDBLOCK_POSITION_DEFAULT;
+ORIGINAL END. */
-- 
GitLab