From 78d2e148755ba491c8ba0e0be555095c87574d83 Mon Sep 17 00:00:00 2001
From: Eric Bremner <ebremner@uwaterloo.ca>
Date: Fri, 12 Nov 2021 16:52:13 +0000
Subject: [PATCH] ISTWCMS-5195: updating to use new node theming methods

---
 templates/node/node.html.twig |  3 +--
 uw_fdsu_theme_resp.theme      | 12 ++++++------
 2 files changed, 7 insertions(+), 8 deletions(-)

diff --git a/templates/node/node.html.twig b/templates/node/node.html.twig
index f1a66165..aa1dc17e 100644
--- a/templates/node/node.html.twig
+++ b/templates/node/node.html.twig
@@ -95,8 +95,7 @@
   {% block content %}
     <div{{ content_attributes.addClass('node__content') }}>
       {% include '@components/card/card--node/card--node.twig' with {
-        'node': node_data,
-        'featured_image': featured_image,
+        'node': node_data
       } %}
     </div>
   {% endblock %}
diff --git a/uw_fdsu_theme_resp.theme b/uw_fdsu_theme_resp.theme
index 3a954422..c846475b 100644
--- a/uw_fdsu_theme_resp.theme
+++ b/uw_fdsu_theme_resp.theme
@@ -366,15 +366,15 @@ function uw_fdsu_theme_resp_preprocess_node(&$variables) {
     // If on a teaser page get the variables for teaser.
     if ($variables['view_mode'] == 'teaser' &&
       in_array($variables['node']->getType(), $teasers_to_preprocess)) {
-      $variables['teaser'] = $nodeContent->getNodeContent($variables['node'], 'teaser', 'all', $uwService->uwGetNodePreprocessing('featured_image'));
+      $variables['teaser'] = $nodeContent->getNodeContent($variables['node'], 'teaser', 'all');
     }
 
     // If on a node page get the variables for now.
     if ($variables['view_mode'] == 'full' &&
-      in_array($variables['node']->getType(), $nodes_to_preprocess)) {
-      $variables['node_data'] = $nodeContent->getNodeContent($variables['node'], 'full', 'all', $uwService->uwGetNodePreprocessing('featured_image'));
+      in_array($variables['node']->getType(), $nodes_to_preprocess
+    )) {
+      $variables['node_data'] = $nodeContent->getNodeContent($variables['node'], 'full', 'all');
       $variables['node_data']['content'] = $variables['content'];
-      $variables['featured_image'] = $uwService->uwCheckNodeForFeaturedImage($variables['node']);
     }
 
     // Unset the content variable, so that we do not get
@@ -512,8 +512,8 @@ function uw_fdsu_theme_resp_preprocess_container(&$variables) {
 
         // If there is a node object, get the header and footer data.
         if ($node) {
-          $variables['header_data'] = $uwNodeContent->getNodeContent($node, 'teaser', 'header', $uwService->uwGetNodePreprocessing('featured_image'));
-          $variables['footer_data'] = $uwNodeContent->getNodeContent($node, 'teaser', 'footer', $uwService->uwGetNodePreprocessing('featured_image'));
+          $variables['header_data'] = $uwNodeContent->getNodeContent($node, 'teaser', 'header');
+          $variables['footer_data'] = $uwNodeContent->getNodeContent($node, 'teaser', 'footer');
         }
       }
     }
-- 
GitLab