{% macro _category_path(category, truncated_path) %} {% set first_node, inner_nodes, last_node, truncated = truncated_path %} {% endmacro %} {% macro _category_item(category, truncated_path, extra_info='') %}
  • {{ category.title }} {{ _category_path(category, truncated_path) }} {{ caller() }} {# The caller must provide the closing span tag (). #} {# TODO This should be changed once Jinja is updated to 2.8 with support for set block. #}
  • {% endmacro %} {% macro user_category(category, truncated_path, is_manager) %} {% call _category_item(category, truncated_path) %} {% if is_manager %} {% else %} {% endif %} {% endcall %} {% endmacro %} {% macro suggested_category(category, truncated_path) %} {% call _category_item(category, truncated_path) %}
    {% trans %}Add to favourites{% endtrans %}
    {% endcall %} {% endmacro %} {% macro favorite_category(category, truncated_path) %} {% call _category_item(category, truncated_path) %} {% endcall %} {% endmacro %}