Commit 725a3b4c authored by Eric Bremner's avatar Eric Bremner
Browse files

ISTWCMS-5234: replacing hero with media for terminology

parent 7541074a
{% if hero == 'no' %}
{% if media == 'no' %}
{%
set classes = [
'block',
......
......@@ -394,9 +394,9 @@ function uw_fdsu_theme_resp_preprocess_block(&$variables) {
// If we do then, set variable to not show page title.
if ($variables['plugin_id'] == 'page_title_block') {
// Set the hero variable to no, we will only
// change if there is a hero.
$variables['hero'] = 'no';
// Set the media variable to no, we will only
// change if there is a media.
$variables['media'] = 'no';
// Load the node.
$node = \Drupal::routeMatch()->getParameter('node');
......@@ -409,13 +409,13 @@ function uw_fdsu_theme_resp_preprocess_block(&$variables) {
$node = Node::load($node);
}
// If there is a node, check that it has a hero.
// If there is a node, check that it has a media.
if ($node) {
// The UW service object.
$uwService = \Drupal::service('uw_cfg_common.uw_service');
$variables['hero'] = $uwService->uwCheckNodeForHero($node);
$variables['media'] = $uwService->uwCheckNodeForMedia($node);
}
}
......@@ -508,7 +508,7 @@ function uw_fdsu_theme_resp_preprocess_container(&$variables) {
// Set variables for featured image.
$variables['node_type'] = str_replace('_', '-', $node->getType());
$variables['hero'] = $uwService->uwCheckNodeForHero($node);
$variables['media'] = $uwService->uwCheckNodeForMedia($node);
// If there is a node object, get the header and footer data.
if ($node) {
......
Supports Markdown
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