Breadcrumbs, výpis pomocí makra

remotes/1722757888236843906/tmp_refs/heads/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" sort_by = "weight"
+++ +++

@ -8,6 +8,22 @@
{% endif %} {% endif %}
{% endmacro list_items %} {% 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) %} {% macro list_posts(section) %}
{% for post in section.pages %} {% for post in section.pages %}
<a href=" <a href="

@ -1,16 +1,7 @@
{% extends "base.html" %} {% extends "base.html" %}
{% block extra %} {% block extra %}
<div class="breadcrumbs"> {{ macro::breadcrumbs(page=page) }}
<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>
{% endblock %} {% endblock %}
{% block content %} {% block content %}

Loading…
Cancel
Save