-
-
Save oksana-c/7cf34a51cfc54ef8b202126bc4fef7dd to your computer and use it in GitHub Desktop.
Drupal 7: Link l() function with attributes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
l( | |
t('<span></span>Link Title'), | |
'link_path', | |
array( | |
'attributes' => array( | |
'class' => array('menu-link'), | |
'id' =>'faq-page', | |
), | |
'html' => TRUE, | |
), | |
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
l( | |
t('Link Title'), | |
'link_path', | |
array( | |
'attributes' => array( | |
'class' => array( | |
'menu-link', | |
'another-class', | |
), | |
'id' =>'faq-page', | |
), | |
'query' => array( | |
'foo' => 'bar', | |
), | |
'fragment' => 'refresh', | |
'html' => TRUE, | |
), | |
); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment