Breadcrumbs for Craft 3 How do you make breadcrumbs in your Twig templates for Craft 3?

Unfortunately I found examples only for Craft 2
When it comes to creating breadcrumbs, I can only offer advice when doing so within a structure.

Craft 3 still has .ancestors available on an entry so you can do:

{% set breadcrumbs = entry.ancestors.all() %}


Then check the length and loop through the ancestors for the structure entry.

{% if breadcrumbs|length %}
    &lt;ul class="breadcrumbs"&gt;
        &lt;li&gt;&lt;a href="{{ siteUrl }}"&gt;Home&lt;/a&gt;&lt;/li&gt;
        {% for crumb in breadcrumbs %}
            &lt;li&gt;&lt;a href="{{ crumb.url }}"&gt;{{ crumb.title }}&lt;/a&gt;&lt;/li&gt;
        {% endfor %}
        &lt;li&gt;{{ entry.title }}&lt;/li&gt;
    &lt;/ul&gt;
{% endif %}


Then just add a little CSS to style as you choose.

&lt;style&gt;
  .breadcrumbs {
    list-style: none;
    padding: 0;
    margin: 0;
  }

  .breadcrumbs li { display: inline; }
  .breadcrumbs li+li:before {
    padding: 8px;
    color: black;
    content: "\000BB";
  }
&lt;/style&gt;


This would use &amp;raquo; between each entry.

Home » First Article » Another Article » Grandchild Article