is it possible to add a body class to a twig template. I would like when a page is created a body class is added to the page automatically then manually adding it.
Community guidelines
Please keep discussions civil and on-topic. Repeated violations may lead to a temporary ban.
Archive
Generally, use <body id="top" class="{{ page.header.body_classes }}"> in templates to accommodate this. If you want a default set, you'd have to use blueprints to handle that somehow.
Log in to reply.
Suggested topics
| Topic | Participants | Replies | Views | Activity |
|---|---|---|---|---|
| 0 | 1297 | 9 years ago | ||
| 2 | 894 | 9 years ago | ||
| 2 | 4024 | 9 years ago | ||
| 1 | 2899 | 9 years ago | ||
| 3 | 1082 | 9 years ago |