eternalistic
8/30/2013 - 10:49 PM

Drupal - l() function with HTML and class.

Drupal - l() function with HTML and class.

<?php 
  $options = array(
    'html' => TRUE,
    'title' => t('SOME TITLE'),
    'attributes' => array('class' => array('button color medium'))
  );

  $output['content'] = l(t('Schedule an appointment'), 'node/8', $options);
?>
<?php print l('<span>' . t('MY TITLE') . '</span>', 'myurl', array('html' => TRUE, 'title' => t('SOME TITLE'), 'attributes' => array('class' => 'myclass'))); ?>