Skip to content

Commit

Permalink
Merge branch 'main' into issue/tiamat-theme/543
Browse files Browse the repository at this point in the history
  • Loading branch information
patrickbrown-io committed Nov 27, 2023
2 parents ec911df + 675de04 commit 05add88
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 2 deletions.
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,14 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

- ### Breadcrumbs updates
Updates to breadcrumbs to not display breadcrumb div when there are no items in the div

Sister PR: https://github.com/CuBoulder/tiamat-custom-entities/pull/86

Closes #549
---

- ### Completes in-content menu blocks
This update completes in-content menu blocks (menu blocks placed outside of a navigation bar, e.g. in a sidebar) by styling them and adding the [Menu Block](https://www.drupal.org/project/menu_block) contrib module for additional options.

Expand Down
13 changes: 13 additions & 0 deletions templates/block/block--boulder-base-breadcrumbs.html.twig
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{#
/**
* Theme layout to display a UCB Breadcrumb Menu Navigation page.
* The purpose of this template is to make sure that there are more links than the home link in the nav item.
*
*/
#}

{% if (content['#links']|length > 1) %}
<div class="container">
{{ content}}
</div>
{% endif %}
2 changes: 1 addition & 1 deletion templates/layout/page.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@

{# MAIN PAGE CONTENT #}
<div class="ucb-page-content">
{% if show_breadcrumb %}
{% if (show_breadcrumb) and (page.breadcrumb|render|striptags|trim) %}
<div class="ucb-breadcrumb-region">
{{ page.breadcrumb }}
</div>
Expand Down
3 changes: 2 additions & 1 deletion templates/regions/region--breadcrumb.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@
]
%}

{% if show_breadcrumb and content %}

{% if (show_breadcrumb) and (content|render|striptags|trim is not empty) %}
<div{{ attributes.addClass(classes) }}>
<div class="ucb-breadcrumb-row row">
{{ content }}
Expand Down

0 comments on commit 05add88

Please sign in to comment.