Skip to content

Instantly share code, notes, and snippets.

@GwendolenLynch
Created February 28, 2015 16:29
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save GwendolenLynch/9fa6b8b29cac48d3343c to your computer and use it in GitHub Desktop.
Save GwendolenLynch/9fa6b8b29cac48d3343c to your computer and use it in GitHub Desktop.
Bolt Foundation 5 Breadcrumbs
{% set route = app.request.get('_route') %}
{% set routeparams = app.request.get('_route_params') %}
<div class="row">
<ul class="breadcrumbs hide-for-small">
{% if route == 'homepage' %}
<li class="current"><a href="{{ paths.root }}">Home</a></li>
{% else %}
<li><a href="{{ paths.root }}">Home</a></li>
{% if route == 'pagebinding' %}
<li class="unavailable"><a href="javascript:void(0)">{{ routeparams.slug }}</a></li>
{% elseif route == 'contentlisting' %}
<li class="unavailable"><a href="javascript:void(0)">{{ routeparams.contenttypeslug }}</a></li>
{% elseif route == 'taxonomylink' %}
<li class="unavailable"><a href="javascript:void(0)">{{ taxonomy.options[routeparams.slug] }}</a></li>
{% elseif route == 'contentlink' %}
{% if record.taxonomy is defined %}
{% if record.taxonomy|keys|first == 'roles' %}
<li class="current"><a href="/{{ record.contenttype.slug }}">{{ record.contenttype.slug }}</a></li>
<li class="unavailable"><a href="javascript:void(0)">{{ routeparams.contenttypeslug }}</a></li>
{% else %}
<li><a href="{{ record.taxonomy|first|keys|first }}">{{ record.taxonomy|first|first }}</a></li>
<li class="unavailable"><a href="javascript:void(0)">{{ record.contenttype.slug }}</a></li>
{% endif %}
{% endif %}
{% endif %}
{% endif %}
</ul>
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment