diff --git a/bootstrap_layouts.module b/bootstrap_layouts.module index 6f0dba5..b2fcb0c 100644 --- a/bootstrap_layouts.module +++ b/bootstrap_layouts.module @@ -153,7 +153,11 @@ function _bootstrap_layouts_preprocess_layout(array &$variables) { // Create region variables based on the layout settings. foreach ($layout->getSetting('regions', []) as $region => $region_settings) { - $region_attributes = new Attribute(_bootstrap_layouts_parse_attributes($region_settings['attributes'], $tokens)); + $parsed_attributes = _bootstrap_layouts_parse_attributes($region_settings['attributes'], $tokens); + if (!empty($variables['region_attributes'][$region])) { + $parsed_attributes = NestedArray::mergeDeep($parsed_attributes, $variables['region_attributes'][$region]); + } + $region_attributes = new Attribute($parsed_attributes); $region_attributes->addClass(array_keys($region_settings['classes'])); if (!empty($region_settings['add_region_classes'])) { $region_attributes->addClass(['bs-region', Html::cleanCssIdentifier("bs-region--$region")]);