This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/core/modules/layout_builder/src/Entity/LayoutBuilderEntityViewDisplay.php b/core/modules/layout_builder/src/Entity/LayoutBuilderEntityViewDisplay.php | |
index 6619c58..9e1fe5b 100644 | |
--- a/core/modules/layout_builder/src/Entity/LayoutBuilderEntityViewDisplay.php | |
+++ b/core/modules/layout_builder/src/Entity/LayoutBuilderEntityViewDisplay.php | |
@@ -300,6 +300,10 @@ protected function buildSections(FieldableEntityInterface $entity) { | |
if ($storage) { | |
foreach ($storage->getSections() as $delta => $section) { | |
$build[$delta] = $section->toRenderArray($contexts); | |
+ $build[$delta]['#view_mode'] = $this->getOriginalMode(); | |
+ $build[$delta]['#bundle'] = $this->getTargetBundle(); |