Commit e53c925a authored by Chris Shantz's avatar Chris Shantz
Browse files

Merge branch '1.0.x' into prod/1.0.x

parents ff38521c 6d20c8c2
......@@ -30,6 +30,7 @@
<div class="node--type-{{ node_type }}">
{% include '@components/card/card--node/card--node.twig' with {
'node': header_data,
'type': 'node',
'featured_image': featured_image,
} %}
</div>
......@@ -41,7 +42,7 @@
<div class="layout uw-contained-width">
{% include '@components/card/card--node/card--node.twig' with {
'node': footer_data,
'type': 'footer',
'type': 'node',
} %}
</div>
{% endif %}
{% include '@components/card/card--teaser/card--teaser.twig' with {
'teaser': teaser,
'type': 'teaser'
} %}
......@@ -96,7 +96,7 @@
<div{{ content_attributes.addClass('node__content') }}>
{% include '@components/card/card--node/card--node.twig' with {
'node': node_data,
'featured_image': featured_image,
'type': 'node'
} %}
</div>
{% endblock %}
......
{% if (view.current_display == 'catalog_a_z_page') %}
<div class="views-element-container contextual-region">
{% endif %}
{% include '@components/tabs/tabs--link/tabs--link.twig' with {
'content_list': content_list,
'tabs_modifier_class': 'catalog'
} %}
{% if catalog_search %}
{% include '@components/catalog-search/catalog-search.twig' with {
'catalog_search': catalog_search
} %}
{% endif %}
{% include '@components/view/views-view/views-view.twig' with {
'title_prefix': title_prefix,
'title': title,
'title_suffix': title_suffix,
'header': header,
'exposed': exposed,
'attachment_before': attachment_before,
'rows': rows,
'pager': pager,
'attachment_after': attachment_after,
'more': more,
'feed_icons': feed_icons,
} %}
{% if (view.current_display == 'catalog_a_z_page') %}
</div>
{% endif %}
{% include '@components/tabs/tabs--link/tabs--link.twig' with {
'content_list': content_list,
} %}
{% if catalog_search %}
{% include '@components/catalog-search/catalog-search.twig' with {
'catalog_search': catalog_search
} %}
{% endif %}
{% include '@components/view/views-view/views-view.twig' with {
'title_prefix': title_prefix,
'title': title,
'title_suffix': title_suffix,
'header': header,
'exposed': exposed,
'attachment_before': attachment_before,
'rows': rows,
'pager': pager,
'attachment_after': attachment_after,
'more': more,
'feed_icons': feed_icons,
} %}
......@@ -39,10 +39,20 @@
dom_id ? 'js-view-dom-id-' ~ dom_id,
]
%}
{% if (view.current_display == 'services_in_category_page') or (view.current_display == 'catalog_a_z_page') %}
<div class="views-element-container contextual-region">
{% endif %}
{% if content_list %}
{% include '@components/tabs/tabs--link/tabs--link.twig' with {
'content_list': content_list,
'tabs_modifier_class': 'catalog'
} %}
{% endif %}
{% if catalog_search %}
{% include '@components/catalog-search/catalog-search.twig' with {
'catalog_search': catalog_search
{% if form_search %}
{% include '@components/form-view-search/form-view-search.twig' with {
'form_search': form_search
} %}
{% endif %}
......@@ -66,3 +76,7 @@
'dom_id': dom_id,
'exp_col_all': exp_col_all,
} %}
{% if (view.current_display == 'services_in_category_page') or (view.current_display == 'catalog_a_z_page') %}
</div>
{% endif %}
# Breakpoints
uw_fdsu_theme_resp.portrait:
label: portrait
mediaQuery: 'all and (min-width: 1em)'
uw_fdsu_theme_resp.x-small:
label: x-small
mediaQuery: 'all and (min-width: 15em)'
......
......@@ -350,6 +350,8 @@ function uw_fdsu_theme_resp_preprocess_node(&$variables) {
// The UW service object.
$uwService = \Drupal::service('uw_cfg_common.uw_service');
$nodeContent = \Drupal::service('uw_cfg_common.uw_node_content');
// The types of nodes the need preprocessing.
$nodes_to_preprocess = $uwService->uwGetNodePreprocessing('full');
......@@ -361,21 +363,18 @@ function uw_fdsu_theme_resp_preprocess_node(&$variables) {
if (in_array($variables['node']->getType(), $nodes_to_preprocess) ||
in_array($variables['node']->getType(), $teasers_to_preprocess)) {
// The UW service object.
$uwService = \Drupal::service('uw_cfg_common.uw_service');
// 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'] = $uwService->uwGetNodeContent($variables['node'], 'teaser', 'all');
$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'] = $uwService->uwGetNodeContent($variables['node'], 'full', 'all');
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
......@@ -489,6 +488,9 @@ function uw_fdsu_theme_resp_preprocess_container(&$variables) {
// The UW service object.
$uwService = \Drupal::service('uw_cfg_common.uw_service');
// The UW node content service.
$uwNodeContent = \Drupal::service('uw_cfg_common.uw_node_content');
// The list of content types that will have header
// and footer in layout builder pages.
$content_types = $uwService->uwGetNodePreprocessing('layout_container');
......@@ -510,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'] = $uwService->uwGetNodeContent($node, 'teaser', 'header');
$variables['footer_data'] = $uwService->uwGetNodeContent($node, 'teaser', 'footer');
$variables['header_data'] = $uwNodeContent->getNodeContent($node, 'teaser', 'header');
$variables['footer_data'] = $uwNodeContent->getNodeContent($node, 'teaser', 'footer');
}
}
}
......
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