Drupal6

I want to add class='apt' to link.

This work: <a href='site/node/2' class='apt'>Go to apt</a>";

This doesn't
l('Go to apt', 'node/$noda->nid', array('class' => 'apt'));
output: <a href='site/node/2'>Go to apt</a>"; without class!

Comments

cog.rusty’s picture

Maybe something like

$options = array('attributes' => array('class' => 'apt'));
print l('Go to apt', "node/$node->nid", $options);
mysocom’s picture

Yes! solved.

icstars’s picture

can also just embed into the link

l('Go to apt', 'node/$noda->nid', array('attributes' => array('class' => 'apt')));

arnieswap’s picture

I need this functionality. How do you embed this and where?