SHARE
TWEET

Untitled

a guest Jun 15th, 2019 46 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. diff --git a/web/modules/custom/odfw_education/src/Controller/EducationController.php b/web/modules/custom/odfw_education/src/Controller/EducationController.php
  2. index 777de017..23423651 100644
  3. --- a/web/modules/custom/odfw_education/src/Controller/EducationController.php
  4. +++ b/web/modules/custom/odfw_education/src/Controller/EducationController.php
  5. @@ -42,12 +42,18 @@ public function segmentRender(NodeInterface $collection, NodeInterface $segment)
  6.        ];
  7.      }
  8.  
  9. +    $build['segment_content'] = [
  10. +      '#prefix' => '<div class="collection-segment-wrapper">',
  11. +      '#suffix' => '</div>',
  12. +      '#weight' => 2,
  13. +    ];
  14. +
  15.      // Render the default segment node display.
  16.      if ($segment->getType() == 'educational_segment') {
  17.        $output = \Drupal::entityTypeManager()
  18.          ->getViewBuilder('node')
  19.          ->view($segment, 'default');
  20. -      $build['segment_content'] = [
  21. +      $build['segment_content']['main'] = [
  22.          '#markup' => render($output),
  23.          '#weight' => 2,
  24.        ];
  25. @@ -93,7 +99,7 @@ public function segmentRender(NodeInterface $collection, NodeInterface $segment)
  26.          '#next' => $next_data,
  27.        ];
  28.  
  29. -      $build['explore_more'] = [
  30. +      $build['segment_content']['explore_more'] = [
  31.          '#markup' => render($explore_more),
  32.          '#weight' => 3,
  33.        ];
  34. @@ -105,12 +111,14 @@ public function segmentRender(NodeInterface $collection, NodeInterface $segment)
  35.        $output = \Drupal::entityTypeManager()
  36.          ->getViewBuilder('node')
  37.          ->view($collection, 'related_content');
  38. -      $build['collection_related_content'] = [
  39. +      $build['segment_content']['collection_related_content'] = [
  40.          '#markup' => render($output),
  41.          '#weight' => 4,
  42.        ];
  43.      }
  44.  
  45.      return $build;
  46.    }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top