Skip to content
Snippets Groups Projects
Commit 78d2e148 authored by Eric Bremner's avatar Eric Bremner
Browse files

ISTWCMS-5195: updating to use new node theming methods

parent b629ebc2
No related branches found
No related tags found
1 merge request!56Feature/istwcms 5195 ebremner node theming
......@@ -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 %}
......
......@@ -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');
}
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment