Is there a way to select a page template from an “if” statement? I would image there is, but I cannot find it. haha. Something like:
I’m trying to add a body class to my modular page without having to rely on doing it through the front-matter.
Here’s what I have in my base.html.twig:
I read in documentation how to do stuff like that from the front matter, but not from the actual page template. Doing it though the blueprint would also be an option if that’s possible.
Ok, looks like I may need to add the body_class block in there because it’s not showing the new class in the html. I tried putting that if statement inside of the current
but it didn’t print. I promise, I’m going to figure out this syntax eventually. haha