<p>Got it!</p>

<pre><code>{% if craft.request.segments %}
&lt;nav class="breadcrubs"&gt;
    &lt;div class="container"&gt;
        &lt;div class="row"&gt;
            &lt;ol class="breadcrumb"&gt;
                &lt;li&gt;&lt;a href="{{ siteUrl }}"&gt;Home&lt;/a&gt;&lt;/li&gt;
                {% for crumb in entry.getAncestors() %}
                    &lt;li&gt;{{ crumb.getLink() }}&lt;/li&gt;
                {% endfor %}
                &lt;li&gt;{{ entry.title }}&lt;/li&gt;
            &lt;/ol&gt;
        &lt;/div&gt;
    &lt;/div&gt;
&lt;/nav&gt;
{% endif %}
</code></pre>

CC BY-SA 4.0
2014-08-06T15:11:36.480Z
2019-07-25T11:50:00.083Z
2019-07-25T11:50:00.083Z
Johannes Lamers
<p>How do you create breadcrumbs based on a structure?</p>

<p><strong>My structure:</strong></p>

<ul>
<li>Parent
<ul>
<li>Child (active)</li>
<li>Other Child</li>
</ul></li>
</ul>

<p>Child</p>

<p><strong>My url:</strong></p>

<p>site.com/parent/child</p>

<p><strong>So my breadcrumb need to be:</strong></p>

<p>home (url) / parent (url) / child</p>

CC BY-SA 3.0
2016-08-01T05:44:14.997Z
The official method is described in this Craft support doc: https://craftcms.com/support/breadcrumbs
Simon East
<navigation><structure>
What is the best way to create breadcrumbs based on a structure?
# What is the best way to create breadcrumbs based on a structure?

(Asked by: username_0 on 2014-08-06)

How do you create breadcrumbs based on a structure?

**My structure:**

* Parent
  + Child (active)
  + Other Child

Child

**My url:**

site.com/parent/child

**So my breadcrumb need to be:**

home (url) / parent (url) / child

**Tags:** navigation, structure

> **Comments:**
> **username_1**: The official method is described in this Craft support doc: https://craftcms.com/support/breadcrumbs  

---

## 1 answers

### Answer by username_0 on 2014-08-06. Score: 13 | Accepted answer

Got it!
{% if craft.request.segments %}

    
        
            
                Home
                {% for crumb in entry.getAncestors() %}
                    {{ crumb.getLink() }}
                {% endfor %}
                {{ entry.title }}
            
        
    

{% endif %}


---

