{% load wagtailadmin_tags i18n %} {% comment "text/markdown" %} Variables accepted by this template: - `breadcrumbs_items` - breadcrumbs items to be rendered, in the format of [{"url": str, "label": str}] - `buttons` - buttons to be rendered beside the final breadcrumbs item - `side_panels` - list of side panels to be rendered - `history_url` - URL to the history view for the current object - `title` - title of the current page, to be displayed as a hidden h1 for screen readers - `search_url` - URL to the search view, should respond with a partial template for the results - `search_form` - form to be rendered for search - `filters` - filters to be rendered - `icon_name` - name of the icon to be used in the header When including this template, use the `only` parameter whenever possible to ensure that the above variables are indeed the only ones needed for this template to work. {% endcomment %} {# Z index 99 to ensure header is always above #}
{# Padding left on mobile to give space for navigation toggle, #}
{% block header_content %} {% block title %} {% if title %} {# Accessible page title as the h1 because we do not want #} {# to put the h1 inside the breadcrumbs #}

{{ title }}

{% endif %} {% endblock %} {% block breadcrumbs %} {% if breadcrumbs_items %} {% breadcrumbs breadcrumbs_items icon_name=icon_name %} {% endif %} {% endblock %} {# Allow actions to be passed as a prerendered variable or defined by extending the template via block_actions #} {% fragment stripped as actions %} {% block actions %} {% for button in buttons %} {% component button %} {% endfor %} {% endblock %} {% endfragment %} {% if actions %} {% include "wagtailadmin/shared/headers/_actions.html" with actions=actions %} {% endif %} {% endblock %}
{% block search_form %} {% if not search_url %} {% elif search_form or filters %} {% endif %} {% endblock %}
{% block autosave_indicator %} {% if autosave_indicator %} {% component autosave_indicator %} {% endif %} {% endblock %} {% block editing_sessions %} {% if editing_sessions %} {% component editing_sessions %} {% endif %} {% endblock %} {% block toggles %} {% if side_panels %} {% include "wagtailadmin/shared/side_panel_toggles.html" %} {% endif %} {% if history_url %} {% include "wagtailadmin/shared/headers/_history_icon_link.html" with history_url=history_url only %} {% endif %} {% endblock %}
{% block side_panels %} {% if side_panels %} {% include "wagtailadmin/shared/side_panels.html" %} {% endif %} {% endblock %}