{% from 'macros/icons.html' import render_icon %}


{% macro render_navigation(navigation, current_page) %}
  <nav class="main">
    <ol>
      {%- for item in navigation.get_items(g.current_user) %}
      <li><a href="{{ item.endpoint }}" title="{{ item.label }}" class="nav-item{% if (item.id is not none) and (item.id is is_current_page(current_page)) %} nav-item--current{% endif %}">
        {%- if item.icon %}<span class="nav-item-icon">{{ render_icon(item.icon) }}</span>{% endif -%}
        <span class="nav-item-label">{{- item.label -}}</span>
      </a></li>
      {%- endfor %}
    </ol>
  </nav>
{% endmacro %}


{% macro render_main_tabs(navigation, current_tab) -%}
  <ol class="main-tabs">
    {%- for item in navigation.get_items(g.current_user) %}
      {%- with is_current = (item.id is not none) and (item.id == current_tab) %}
    <li><a href="{{ item.endpoint }}"{% if is_current %} class="current"{% endif -%}>{% if item.icon %}{{ render_icon(item.icon) }} {% endif %}{{ item.label }}</a></li>
      {%- endwith %}
    {%- endfor %}
  </ol>
{%- endmacro %}


{% macro render_extra_in_heading(value) -%}
  <small>{{ value }}</small>
{%- endmacro %}

{% from 'macros/icons.html' import render_icon %}


{% macro render_navigation(navigation, current_page) %}
  <nav class="main">
    <ol>
      {%- for item in navigation.get_items(g.current_user) %}
      <li><a href="{{ item.endpoint }}" title="{{ item.label }}" class="nav-item{% if (item.id is not none) and (item.id == current_page) %} nav-item--current{% endif %}">
        {%- if item.icon %}<span class="nav-item-icon">{{ render_icon(item.icon) }}</span>{% endif -%}
        <span class="nav-item-label">{{- item.label -}}</span>
      </a></li>
      {%- endfor %}
    </ol>
  </nav>
{% endmacro %}


{% macro render_main_tabs(navigation, current_tab) -%}
  <ol class="main-tabs">
    {%- for item in navigation.get_items(g.current_user) %}
      {%- with is_current = (item.id is not none) and (item.id == current_tab) %}
    <li><a href="{{ item.endpoint }}"{% if is_current %} class="current"{% endif -%}>{% if item.icon %}{{ render_icon(item.icon) }} {% endif %}{{ item.label }}</a></li>
      {%- endwith %}
    {%- endfor %}
  </ol>
{%- endmacro %}


{% macro render_extra_in_heading(value) -%}
  <small>{{ value }}</small>
{%- endmacro %}

Check current page without `is_current_page` template test
Check current page without `is_current_page` template test
