Heine

  • Home
  • Drupal
  • About
Home » Guides » Drupal Developer FAQ

How do I add a class to a link generated with l()

You can add attributes by using the 'attributes' key in the options array:

l('text', 'path', array('attributes' => array('class' => 'myclass')));
‹ Help! - Cannot access a global variable. up How do I recreate a Javascript translation file? ›
  • Printer-friendly version

Recent posts

  • Teampassword manager's password generator is biased
  • Other vectors for SA-CORE-2014-005?
  • Lazy loading: hook_hook_info is for hook owners only.
  • "Always offline" problem in EA's Origin due to antivirus
  • From bug to exploit - Bakery SSO
more

Security reviews

I provide security reviews of custom code, contributed modules, themes and entire sites via LimoenGroen.

Contact us for a quote.

Follow @ustima

Copyright © 2021 by Heine Deelstra. All rights reserved.

  • Home
  • Drupal
  • About