{% load i18n wagtailadmin_tags %} {% comment "text/markdown" %} Variables accepted by this template: - `classname` - if present, adds classname to the header class list - `title` - Displayed as `h1` - `subtitle` - Within the `h1` tag but smaller - `search_url` - if present, display a search box. This is a URL route name (taking no parameters) to be used as the action for that search box - `search_form` - form object for the search form. Required if search_url is passed - `search_results_url` - URL to be used for async requests to search results, if not provided, the form's action URL will be used - `search_target` - A selector string to be used as the target for the search results to be swapped into. Defaults to '#listing-results' - `search_disable_async` - If True, the default header async search functionality will not be used - `query_parameters` - a query string (with or without the '?') to be placed after the search URL - `icon` - name of an icon to place against the title - `merged` - if true, add the classname 'w-header--merged' - `action_url` - if present, display an 'action' button. This is the URL to be used as the link URL for the button - `action_text` - text for the 'action' button - `action_icon` - icon for the 'action' button, default is 'plus' - `base_actions` - base actions to appear before the main action - `extra_actions` - extra action buttons for the header. This is the HTML to be used for the extra buttons - `heading` - Replaces the header `h1` completely with custom variable content - `search` - An alternative search content variable displayed if provided and search_url url is not present - `extra_rows` - Shown at the end of the header container {% endcomment %}
{% if heading %} {{ heading }} {% else %}

{% if icon %} {% icon classname="w-header__glyph" name=icon %} {% endif %} {{ title }}{% if subtitle %} {{ subtitle }}{% endif %}

{% endif %}
{% if search_url %} {% elif search %} {{ search }} {% endif %}
{% if base_actions %} {{ base_actions }} {% endif %} {% block right_column %} {% if action_url %}
{% with action_icon|default:'plus' as action_icon_name %} {% icon name=action_icon_name wrapped=1 %}{{ action_text|capfirst }} {% endwith %}
{% endif %} {% endblock %} {% if extra_actions %} {{ extra_actions }} {% endif %}
{% block extra_rows %}{{ extra_rows }}{% endblock %}