Page title
Usage
To make use of the responsive page header, it is advised to use the twig embed functionality to include this page title
component in your template. The title block must be set obviously, but label and buttons are both optional.
info
Note the use of the
This optional parameter can be set when the page title is the first element on the page. When (for example) a breadcrumb is at the top, please don't use this parameter.
with { is_at_top_of_page: true }; This optional parameter can be set when the page title is the first element on the page. When (for example) a breadcrumb is at the top, please don't use this parameter.
{% embed '@leviy-templates/components/page-title.html.twig' with { is_at_top_of_page: true } %}
{% import '@leviy-templates/macros/buttons.html.twig' as buttons %}
{% block title %}{{- 'A random page title' -}}{% endblock %}
{% block label %}
{% include '@leviy-templates/components/label.html.twig' with {
'text': 'Label',
'style': 'success'
} %}
{% endblock %}
{% block buttons %}
{{ buttons.button('Activate', 'primary', 'submit') }}
{% endblock %}
{% endembed %}