{% if block.post_type == 'pages' %} {% set current_post = post_type.pages[currentPage] %} {% elseif block.post_type == 'taxonomy_archive' %} {% set current_post = taxonomies[block.taxonomy].terms[current_term] %} {% else %} {% set current_post = post_type[block.post_type].items[currentPost] %} {% endif %} <nav aria-label="Breadcrumbs" class="breadcrumbs {{block.classes}}"> <ul> {% if current_post.terms %} {% for current_post_term_id in current_post.terms %} {% set term = taxonomies[block.post_type].terms[current_post_term_id] %} <li><a href="{{term.url}}">{{term.name}}</a></li> {% endfor %} {% endif %} {% if block.parents|length > 0 %} {% for parent_page_id in block.parents %} {% set parent_page = post_type.pages[parent_page_id] %} <li><a href="{{parent_page.url}}">{{parent_page.title}}</a></li> {% endfor %} {% endif %} {% if block.post_type == 'taxonomy_archive' %} <li><a href="#">{{current_post.base}}</a></li> {% endif %} {% if block.post_type == 'courses' %} {% set degree = post_type.degrees.items[current_post.parent] %} <li><a href="{{degree.url}}">{{degree.title}}</a></li> {% endif %} {% if current_post.name %} <li><span aria-current="page">{{current_post.name}}</span></li> {% else %} <li><span aria-current="page">{{current_post.title}}</span></li> {% endif %} </ul> </nav>