kevinpapst/TablerBundle

How to set body class in fullpage.html.twig

Closed this issue · 1 comments

I am trying to override the body class with the fullpage template:

<body{% block body_start %}{% endblock %} class="d-flex flex-column {{ 'border-top-wide border-primary theme-light'|tabler_body }}">
{% block after_body_start %}{% endblock %}

I am able to "override" it but this is definitively not correct 😀

{% extends '@Tabler/error.html.twig' %}

{% block title %}Zugriff verweigert!{% endblock %}

{% block body_start %} class="border-top-wide border-danger theme-light" {% endblock %}

{% block error_title %}
    ASDFLJL""22
{% endblock %}

I do not understand how to do it properly. Any help appreciated.

You can sent a PR adding a new block {% block body_class %}{% endblock %} to body tag like this:

<body class="...  {% block body_class %}{% endblock %}"

Needs to be done in fullpage.html.twig and layout.html.twig.
It already exists in security.html.twig.