Heine

  • home
  • drupal
  • drupal core commits
  • about
Home

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')));

No votes yet
‹ Help! - Cannot access a global variable. up How do I recreate a Javascript translation file? ›
  • Printer-friendly version
  • Login or register to post comments

Recent posts

  • Unserializing user-supplied data, a bad idea
  • Planet Drupal past and current
  • Help! - Cannot access a global variable.
  • Why is my module's update hook not listed on update.php's selection form?
  • How do I add a class to a link generated with l()
more

Security reviews

  • Afraid custom code makes your site vulnerable?
  • You don't really trust that module you just downloaded from Drupal.org?

Sleep better after a security review.

Tags

Captcha CSRF Drupal embed Input Format modx OpenID Performance Planet Drupal rants Security Varnish
more tags
  • home
  • drupal
  • drupal core commits
  • about

Copyright © 2010 by Heine Deelstra. All rights reserved.