Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- diff --git a/web/modules/custom/odfw_education/src/Controller/EducationController.php b/web/modules/custom/odfw_education/src/Controller/EducationController.php
- index 777de017..23423651 100644
- --- a/web/modules/custom/odfw_education/src/Controller/EducationController.php
- +++ b/web/modules/custom/odfw_education/src/Controller/EducationController.php
- @@ -42,12 +42,18 @@ public function segmentRender(NodeInterface $collection, NodeInterface $segment)
- ];
- }
- + $build['segment_content'] = [
- + '#prefix' => '<div class="collection-segment-wrapper">',
- + '#suffix' => '</div>',
- + '#weight' => 2,
- + ];
- +
- // Render the default segment node display.
- if ($segment->getType() == 'educational_segment') {
- $output = \Drupal::entityTypeManager()
- ->getViewBuilder('node')
- ->view($segment, 'default');
- - $build['segment_content'] = [
- + $build['segment_content']['main'] = [
- '#markup' => render($output),
- '#weight' => 2,
- ];
- @@ -93,7 +99,7 @@ public function segmentRender(NodeInterface $collection, NodeInterface $segment)
- '#next' => $next_data,
- ];
- - $build['explore_more'] = [
- + $build['segment_content']['explore_more'] = [
- '#markup' => render($explore_more),
- '#weight' => 3,
- ];
- @@ -105,12 +111,14 @@ public function segmentRender(NodeInterface $collection, NodeInterface $segment)
- $output = \Drupal::entityTypeManager()
- ->getViewBuilder('node')
- ->view($collection, 'related_content');
- - $build['collection_related_content'] = [
- + $build['segment_content']['collection_related_content'] = [
- '#markup' => render($output),
- '#weight' => 4,
- ];
- }
- return $build;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement