Skip to main content
drupalreleases

Use direct release data with your AI assistant.

Learn more

Node Class

Security covered Under active development 1,941 sites

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.

Drupal 8–11

Ask your assistant about Node 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.

Activity

Tracked releases
2
Tracked since
Nov 2023
Latest release
7 months ago
Releases (12 mo)
1 ▲ from 0
Maintenance
Active

Releases

Version Type Core PHP Release date
2.1.0 Stable 8–11 Apr 4, 2026
2.0.1 Stable 8–10 Nov 28, 2023