Part of the Entity ecosystem · 306 projects
This module allows you to add custom CSS classes to the body tag for specific content items. It provides a field for most content types, enabling you to easily style individual pages based on their content. You can control who can set these classes and configure default values.
Provides a new "Body CSS class(es)" field for all entity types. The value of the field will be added as a class for the body tag on the entity page.
Entity types:
The module supports all entity types that have canonical routes. e.g. Node, Taxonomy term, User, Comment, Media, etc.
Permissions:
You can configure who can see the field on the form by managing the Manage body class fields permission.
You can configure who can add default values on the /admin/config/content/body-class-settings page by managing the Manage body class settings permission.
Form display:
The module adds a base field that can be hidden by moving it to the disabled region on the manage form display page.
There is a validation callback for the field to filter values against XSS. The field also supports tokens.
Maintainers:
This project is originally written by AstonVictor.
Ask your assistant about Entity body class
Check compatibility with your Drupal and PHP version, maintenance and security coverage, from current release data. How it works
Depends on
Dependencies of the latest stable release
No dependencies recorded for this project.
Required by
Tracked projects that depend on this one
No tracked projects depend on this one yet.
More in the Entity ecosystem
Most installed first