Skip to content

Instantly share code, notes, and snippets.

@robdecker
Last active November 2, 2019 01:44
Show Gist options
  • Save robdecker/5863349 to your computer and use it in GitHub Desktop.
Save robdecker/5863349 to your computer and use it in GitHub Desktop.
[Link l() function with attributes] #d7
l(
t('<span></span>Link Title'),
'link_path',
array(
'attributes' => array(
'class' => array('menu-link'),
'id' =>'faq-page',
),
'html' => TRUE,
),
);
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,
),
);
@najmuqaisar
Copy link

'attributes' => array(
'class' => array('menu-link'),

Can You explain this here what will be menu-link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment