How do you create breadcrumbs based on a structure?

My structure:

  • Parent
    • Child (active)
    • Other Child


My url:


So my breadcrumb need to be:

home (url) / parent (url) / child


Got it!

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.