Skip to content

page_title

The page_title macro is used to render a title of a specific page.

Definition

{% macro page_title(title, classNames) %}

Input parameters

title

string represents the title of the page

classNames

string represents a string of classes that will be added to the page title

Example

Rendering a "Hello world" page title with custom classes

{{ page_title('Hello world', ['p_s', 'color_success-500']) }}

Macro source code

{% macro page_title(title, classNames) %}
    <h2 {% if classNames %}class="{{ classNames|join(' ') }}"{% endif %}>
        {{ title }}
    </h2>
{% endmacro %}