comparison sat_templates/templates/default/components/common.html @ 187:7539d98e1d08

components (menu): disable cache when importing "menu_labels": When using cache, first translation was used whatever locale was used after that.
author Goffi <goffi@goffi.org>
date Sun, 14 Apr 2019 08:09:40 +0200
parents 240bbac435f4
children
comparison
equal deleted inserted replaced
186:23ba0f7fc205 187:7539d98e1d08
1 {% import 'components/menu_labels.html' as ml %} 1 {% import 'components/menu_labels.html' as ml with context %}
2 {# we need to use "with context" to disable cache, needed for i18n #}
2 3
3 {% macro menu(menus, class='') %} 4 {% macro menu(menus, class='') %}
4 <nav class="menu {{class}}"> 5 <nav class="menu {{class}}">
5 <ul> 6 <ul>
6 {% for name,url in menus %} 7 {% for name,url in menus %}