-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adding a variable for page title for breadcrumbs and printing it as t…
…he last breadcrumb.
- Loading branch information
Mark Conroy
committed
Jan 5, 2018
1 parent
d164a65
commit 8456005
Showing
2 changed files
with
42 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
{# | ||
/** | ||
* @file | ||
* Theme override for a breadcrumb trail. | ||
* | ||
* Available variables: | ||
* - breadcrumb: Breadcrumb trail items. | ||
*/ | ||
#} | ||
{% if breadcrumb %} | ||
<nav class="breadcrumb" role="navigation" aria-labelledby="system-breadcrumb"> | ||
<h2 id="system-breadcrumb" class="visually-hidden">{{ 'Breadcrumb'|t }}</h2> | ||
<ol> | ||
{% for item in breadcrumb %} | ||
<li> | ||
{% if item.url %} | ||
<a href="{{ item.url }}">{{ item.text }}</a> | ||
{% else %} | ||
{{ item.text }} | ||
{% endif %} | ||
</li> | ||
{% endfor %} | ||
{# | ||
Once the breadcrumb loop completes, we add the current page title. | ||
This variable is created in umami.theme. | ||
#} | ||
<li> {{ current_page_title }}</li> | ||
</ol> | ||
</nav> | ||
{% endif %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters