Muut
1
I’m making a theme that inherits from antimatter, and the templates inherit from base.html.twig.
I’d my template “has-header” to add classes to the element, as if all pages using that template also defined “body_classes” in their yaml frontmatter.
Is there a nice way to do this without duplication? Apologies for such a simple question!
Muut
2
you would have to override the templates/partials/base.html.twig
in your template to add that logic to the <body>
element.
Muut
3
Is there a variable “page.template”? Would I write something along the lines of:
Muut
4
(oh! the answer is literally yes. Thanks for all your help, you’re fantastic)