Skip to content
Snippets Groups Projects
Commit cecd1f1d authored by squidfunk's avatar squidfunk
Browse files

Drop 'with' in templates to be compatible with Jinja < 2.9

parent 6033519d
No related branches found
No related tags found
No related merge requests found
...@@ -15,9 +15,8 @@ ...@@ -15,9 +15,8 @@
<ul class="md-nav__list" data-md-scrollfix> <ul class="md-nav__list" data-md-scrollfix>
{% set base = path %} {% set base = path %}
{% for nav_item in nav_item.children %} {% for nav_item in nav_item.children %}
{% with path = base + "-" + loop.index | string %} {% set path = base + "-" + loop.index | string %}
{% include "partials/nav-item.html" %} {% include "partials/nav-item.html" %}
{% endwith %}
{% endfor %} {% endfor %}
</ul> </ul>
</nav> </nav>
......
...@@ -16,9 +16,8 @@ ...@@ -16,9 +16,8 @@
{% endif %} {% endif %}
<ul class="md-nav__list" data-md-scrollfix> <ul class="md-nav__list" data-md-scrollfix>
{% for nav_item in nav %} {% for nav_item in nav %}
{% with path = "nav-" + loop.index | string %} {% set path = "nav-" + loop.index | string %}
{% include "partials/nav-item.html" %} {% include "partials/nav-item.html" %}
{% endwith %}
{% endfor %} {% endfor %}
</ul> </ul>
</nav> </nav>
...@@ -42,13 +42,12 @@ ...@@ -42,13 +42,12 @@
{{ nav_item.title}} {{ nav_item.title}}
</label> </label>
<ul class="md-nav__list" data-md-scrollfix> <ul class="md-nav__list" data-md-scrollfix>
{% set base = path %}
<!-- Render nested item list --> <!-- Render nested item list -->
{% set base = path %}
{% for nav_item in nav_item.children %} {% for nav_item in nav_item.children %}
{% with path = base + "-" + loop.index | string %} {% set path = base + "-" + loop.index | string %}
{% include "partials/nav-item.html" %} {% include "partials/nav-item.html" %}
{% endwith %}
{% endfor %} {% endfor %}
</ul> </ul>
</nav> </nav>
......
...@@ -39,9 +39,8 @@ ...@@ -39,9 +39,8 @@
{% endif %} {% endif %}
<ul class="md-nav__list" data-md-scrollfix> <ul class="md-nav__list" data-md-scrollfix>
{% for nav_item in nav %} {% for nav_item in nav %}
{% with path = "nav-" + loop.index | string %} {% set path = "nav-" + loop.index | string %}
{% include "partials/nav-item.html" %} {% include "partials/nav-item.html" %}
{% endwith %}
{% endfor %} {% endfor %}
</ul> </ul>
</nav> </nav>
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment