diff --git a/templates/blocks/block--page-title-block.html.twig b/templates/blocks/block--page-title-block.html.twig index a8f06feda739bfa6b92774cc5ccdf236331a3c69..564b2fcf025c2f0ccde89b73147513484f883fe8 100644 --- a/templates/blocks/block--page-title-block.html.twig +++ b/templates/blocks/block--page-title-block.html.twig @@ -1,12 +1,23 @@ -{% if media == 'no' %} - {% - set classes = [ - 'block', - 'block-' ~ configuration.provider|clean_class, - 'block-' ~ plugin_id|clean_class, - ] - %} +{% if show_title is not defined %} + {% set show_title = TRUE %} +{% endif %} +{% + set classes = [ + 'block', + 'block-' ~ configuration.provider|clean_class, + 'block-' ~ plugin_id|clean_class, +] +%} +{#This is to show the title to the user at top of page inside the collapsable area, when doing the updates in layout builder#} +{% if not show_title and in_layout_builder %} + <div{{ attributes.addClass(classes) }}> + {% block page_title_content %} + {{ content }} + {% endblock %} + </div> +{% endif %} +{% if show_title %} <div{{ attributes.addClass(classes) }}> {% if admin_label %} <div class="uw-admin-label">{{ admin_label }}</div> @@ -21,40 +32,3 @@ {% endblock %} </div> {% endif %} -{# // OHANA // OHANA // OHANA // OHANA - -/** - * @file - * Theme override for page title block. - */ - - -{% set classes = [ - 'l-block--provider-' ~ configuration.provider|clean_class, - 'l-block--id-' ~ plugin_id|clean_class, -] %} - -{% set attributes = attributes.addClass(classes) %} - -{% embed '@layouts/block/block.twig' with { - 'attributes': attributes, - 'block_wrapper': true, - 'constrain': '', - 'title_prefix': title_prefix, - 'title_suffix': title_suffix, - 'label': label is not empty ? label : false, - 'content_wrapper': true -} %} - - {% block content %} - {% include '@components/page-title/page-title.twig' with { - 'page_title': content['#title'] - } %} - {% endblock %} - -{% endembed %} - - - - OHANA // OHANA // OHANA // OHANA #} - diff --git a/templates/node/node.html.twig b/templates/node/node.html.twig index f59785e077b817d8d9ed352513e2c6c851851f80..c90421c0366407599cc1b2a991a805250bdbbd55 100644 --- a/templates/node/node.html.twig +++ b/templates/node/node.html.twig @@ -100,7 +100,8 @@ <div{{ content_attributes.addClass('node__content') }}> {% include '@components/card/card--node/_card--node.twig' with { 'node': node_data, - 'type': 'node' + 'type': 'node', + 'media_flags': media_flags } %} </div> {% endblock %} diff --git a/uw_fdsu_theme_resp.theme b/uw_fdsu_theme_resp.theme index e454fa91a466e4a1ad385e0e11fa85d453e223d7..9e2ed293125aa580e321ea0f9c9d6b4b555acff5 100644 --- a/uw_fdsu_theme_resp.theme +++ b/uw_fdsu_theme_resp.theme @@ -506,6 +506,17 @@ function uw_fdsu_theme_resp_preprocess_block(&$variables) { // Load the node. $node = \Drupal::routeMatch()->getParameter('node'); + // If this is a node, check for contact and set if we + // have to hide the title. + if ($node = \Drupal::routeMatch()->getParameter('node')) { + + // Get the media flags. + $media_flags = \Drupal::service('uw_cfg_common.uw_service')->uwGetMediaFlags($node); + + // Set the show title flag. + $variables['show_title'] = $media_flags['has_media'] || $media_flags['has_portrait'] ? FALSE : TRUE; + } + // ISTWCMS-4943: ensure that we get a node object. // If node is not object by this point, probably on // a revision page where node is an integer, so load @@ -614,11 +625,12 @@ function uw_fdsu_theme_resp_preprocess_container(&$variables) { // Set variables for featured image. $variables['node_type'] = str_replace('_', '-', $node->getType()); $variables['media'] = $uwService->uwCheckNodeForMedia($node); + $variables['media_flags'] = $uwService->uwGetMediaFlags($node); // If there is a node object, get the header and footer data. if ($node) { - $variables['header_data'] = $uwNodeContent->getNodeContent($node, 'teaser', 'header'); - $variables['footer_data'] = $uwNodeContent->getNodeContent($node, 'teaser', 'footer'); + $variables['header_data'] = $uwNodeContent->getNodeContent($node, 'full', 'header'); + $variables['footer_data'] = $uwNodeContent->getNodeContent($node, 'full', 'footer'); } } }