{% macro render_nav_item(endpoint, text, _badge='', _use_li=False) %} {% set active = True if request.endpoint and request.endpoint == endpoint else False %} {% if _use_li %}