| 1 | {% import 'components/menu_labels.html' as ml with context %} |
| 2 | {# we need to use "with context" to disable cache, needed for i18n #} |
| 3 | |
| 4 | {% macro menu(menus, class='') %} |
| 5 | <nav class="menu {{class}}"> |
| 6 | <ul> |
| 7 | {% for name,url in menus %} |
| 8 | <li><a class="menu_item menu_item--{{name}}" {{ {'href': url}|xmlattr }}>{{ml.label[name]}}</a></li> |
| 9 | {% endfor %} |
| 10 | </ul> |
| 11 | {% if caller is defined %} |
| 12 | {{ caller()}} |
| 13 | {% endif %} |
| 14 | </nav> |
| 15 | {% endmacro %} |