Updated to Drupal 8.5. Core Media not yet in use.
[yaffs-website] / web / core / profiles / demo_umami / themes / umami / templates / components / navigation / breadcrumb.html.twig
diff --git a/web/core/profiles/demo_umami/themes/umami/templates/components/navigation/breadcrumb.html.twig b/web/core/profiles/demo_umami/themes/umami/templates/components/navigation/breadcrumb.html.twig
new file mode 100644 (file)
index 0000000..a5d40a3
--- /dev/null
@@ -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 %}