Skip to content

Instantly share code, notes, and snippets.

@psynaptic
Forked from mortendk/breadcrump.twig
Created October 7, 2012 17:53
Show Gist options
  • Save psynaptic/3849063 to your computer and use it in GitHub Desktop.
Save psynaptic/3849063 to your computer and use it in GitHub Desktop.
twig breadcrumbs
<nav class="breadcrumb" role="navigation">
<h2 class="element-invisible">{{ 'You are here'|t }}</h2>
<ol>
{% for item in breadcrumb %}
{% if loop.first %}
<li>{{ item }} » </li>
{% elseif loop.last %}
<li>{{ item }}</li>
{% else %}
<li>{{ item }} » </li>
{% endif %}
{% endfor %}
</ol>
</nav>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment