fr
/
web
forked from kittv/web
1
0
Fork 0

Breadcrumbs, výpis pomocí makra

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