Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
This project is not covered by Drupal’s security advisory policy.
This module provides tools to manage html attributes (classes etc) and print them.
The usual ugly arrays and if/else logic when dealing with drupal_attributes() are all wrapped in an object.
Usage:
$attr = htmltag_tag_attributes();
$attr->addClass('odd');
// This will print '<li class="odd">Make me a sandwich</li>'.
print $attr->LI("Make me a sandwich");
// This will print ' class="odd"'.
print $attr;
This thing is used inside Menupoly to handle the attributes (class and other) of UL, LI and A in menu items.
Project information
- 27 sites report using this module
- Created by donquixote on , updated
- This project is not covered by the security advisory policy.
Use at your own risk! It may have publicly disclosed vulnerabilities.
Releases
7.x-1.0-alpha1
released 13 May 2012
Works with Drupal: 7.x
✓ Recommended by the project’s maintainer.
Development version: 7.x-1.x-dev updated 6 Jul 2016 at 20:22 UTC