Breadcrumbs, výpis pomocí makra

remotes/1726908188925722499/search
Emil Miler 4 years ago
parent 5879f3ef7f
commit 5885f87261

@ -1,3 +1,4 @@
+++
title = "Aktuality"
+++

@ -1,4 +1,5 @@
+++
title = "Spřátelené weby"
sort_by = "weight"
+++

@ -8,6 +8,22 @@
{% endif %}
{% endmacro list_items %}
{% macro breadcrumbs(page) %}
<div class="breadcrumbs">
<div class="wrap">
<a href="{{ config.base_url }}" class="home"><img src="{{ get_url(path="home.svg") }}" alt="Home"></a>
<ul>
{% for ancestor in page.ancestors %}
{% if loop.first %}{% continue %}{% endif %}
{% set section = get_section(path=ancestor) %}
<li><a href="{{ section.permalink }}">{{ section.title }}</a></li>
{% endfor %}
<li><a href="{{ page.permalink }}">{{ page.title }}</a></li>
</ul>
</div>
</div>
{% endmacro breadcrumbs %}
{% macro list_posts(section) %}
{% for post in section.pages %}
<a href="

@ -1,16 +1,7 @@
{% extends "base.html" %}
{% block extra %}
<div class="breadcrumbs">
<div class="wrap">
<a href="{{ config.base_url }}" class="home"><img src="{{ get_url(path="home.svg") }}" alt="Home"></a>
<ul>
<li><a href="">Item</a></li>
<li><a href="">Item</a></li>
<li><a href="">Item</a></li>
</ul>
</div>
</div>
{{ macro::breadcrumbs(page=page) }}
{% endblock %}
{% block content %}

Loading…
Cancel
Save