Skip to content

Instantly share code, notes, and snippets.

View kamartem's full-sized avatar

Artem Kamyshansky kamartem

View GitHub Profile
@kamartem
kamartem / breadcrumb.jinja
Created March 22, 2023 19:12 — forked from VincentLoy/breadcrumb.jinja
Easy snippet to get breadcrumb in a Wagtail page
<div class="breadcrumb-content">
{% if self.get_ancestors|length > 1 %}
<ul class="breadcrumb">
{% for p in self.get_ancestors %}
{% if p.is_root == False %}
<li><a href="{{ p.url }}">{{ p.title }}</a></li>
{% endif %}
{% endfor %}
<li class="active">{{ self.title }}</li>