Node Class
2,094 sites
Security covered
Drupal 8–11
This module lets you add custom CSS classes to individual nodes directly from the node creation interface.
Node Class is a simple module that allows users to add custom CSS classes to any node through the node/add interface.
For Drupal 6 only
Add the following PHP snippet to your node.tpl.php
<?php print node_class($node) ?>
So your new node.tpl.php
<div id="node-<?php print $node->nid; ?>" class="<?php print node_class($node) ?> node<?php if ($sticky) { print ' sticky'; } ?><?php if (!$status) { print ' node-unpublished'; } ?>">
Tutorial: Node class (Video tutorial)
Related Module:
Node type class: This module adds class per content type.
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.