{%- if g.current_user.has_permission(AdminPermission.access) %}

  {%- with
    current_page = current_page|default,
    site = current_page_site|default
  %}
    {%- with party = current_page_party|default(get_party_for_site(site) if site else None) %}
    {%- with brand = current_page_brand|default(get_brand_for_party(party) if party else None) %}

        {%- include 'layout/admin/_navigation_global.html' %}
        {%- include 'layout/admin/_navigation_brand.html' %}
        {%- include 'layout/admin/_navigation_party.html' %}

        {%- if site %}
        {%- include 'layout/admin/_navigation_site.html' %}
        {%- endif %}

      {%- endwith %}
    {%- endwith %}
  {%- endwith %}

{%- endif %}

{%- if g.current_user.has_permission(AdminPermission.access) %}

  {%- with
    current_page = current_page|default,
    site = current_page_site|default
  %}
    {%- with party = current_page_party|default %}
    {%- with brand = current_page_brand|default(get_brand_for_party(party) if party else None) %}

        {%- include 'layout/admin/_navigation_global.html' %}
        {%- include 'layout/admin/_navigation_brand.html' %}
        {%- include 'layout/admin/_navigation_party.html' %}

        {%- if site %}
        {%- include 'layout/admin/_navigation_site.html' %}
        {%- endif %}

      {%- endwith %}
    {%- endwith %}
  {%- endwith %}

{%- endif %}

Hide party navigation in site views
Hide party navigation in site views
