HTML tag
Component ID
1576042
Component name
HTML tag
Component type
module
Maintenance status
Development status
Component security advisory coverage
not-covered
Downloads
1439
Component created
Component changed
Component body
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.
