Commit 78d2e148 authored by Eric Bremner's avatar Eric Bremner
Browse files

ISTWCMS-5195: updating to use new node theming methods

parent b629ebc2
...@@ -95,8 +95,7 @@ ...@@ -95,8 +95,7 @@
{% block content %} {% block content %}
<div{{ content_attributes.addClass('node__content') }}> <div{{ content_attributes.addClass('node__content') }}>
{% include '@components/card/card--node/card--node.twig' with { {% include '@components/card/card--node/card--node.twig' with {
'node': node_data, 'node': node_data
'featured_image': featured_image,
} %} } %}
</div> </div>
{% endblock %} {% endblock %}
......
...@@ -366,15 +366,15 @@ function uw_fdsu_theme_resp_preprocess_node(&$variables) { ...@@ -366,15 +366,15 @@ function uw_fdsu_theme_resp_preprocess_node(&$variables) {
// If on a teaser page get the variables for teaser. // If on a teaser page get the variables for teaser.
if ($variables['view_mode'] == 'teaser' && if ($variables['view_mode'] == 'teaser' &&
in_array($variables['node']->getType(), $teasers_to_preprocess)) { 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 on a node page get the variables for now.
if ($variables['view_mode'] == 'full' && if ($variables['view_mode'] == 'full' &&
in_array($variables['node']->getType(), $nodes_to_preprocess)) { in_array($variables['node']->getType(), $nodes_to_preprocess
$variables['node_data'] = $nodeContent->getNodeContent($variables['node'], 'full', 'all', $uwService->uwGetNodePreprocessing('featured_image')); )) {
$variables['node_data'] = $nodeContent->getNodeContent($variables['node'], 'full', 'all');
$variables['node_data']['content'] = $variables['content']; $variables['node_data']['content'] = $variables['content'];
$variables['featured_image'] = $uwService->uwCheckNodeForFeaturedImage($variables['node']);
} }
// Unset the content variable, so that we do not get // Unset the content variable, so that we do not get
...@@ -512,8 +512,8 @@ function uw_fdsu_theme_resp_preprocess_container(&$variables) { ...@@ -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 there is a node object, get the header and footer data.
if ($node) { if ($node) {
$variables['header_data'] = $uwNodeContent->getNodeContent($node, 'teaser', 'header', $uwService->uwGetNodePreprocessing('featured_image')); $variables['header_data'] = $uwNodeContent->getNodeContent($node, 'teaser', 'header');
$variables['footer_data'] = $uwNodeContent->getNodeContent($node, 'teaser', 'footer', $uwService->uwGetNodePreprocessing('featured_image')); $variables['footer_data'] = $uwNodeContent->getNodeContent($node, 'teaser', 'footer');
} }
} }
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment