Skip to content

Instantly share code, notes, and snippets.

@jeremycaldwell
Last active December 22, 2015 01:18
Show Gist options
  • Save jeremycaldwell/6395037 to your computer and use it in GitHub Desktop.
Save jeremycaldwell/6395037 to your computer and use it in GitHub Desktop.
Drupal - l() function with HTML and class.
<?php print l('<span>' . t('MY TITLE') . '</span>', 'myurl', array('html' => TRUE, 'title' => t('SOME TITLE'), 'attributes' => array('class' => 'myclass'))); ?>
<?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);
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment