I'm trying to add an ID to a link created by JHTML. Is that possible? Here's my call, is there some way I can do a , #myId
as part of the below?
<?php echo JHtml::_('icon.edit', $displayData['item'], $displayData['params']); ?>
Joomla Stack Exchange is a question and answer site for Joomla! administrators, users, developers and designers. It only takes a minute to sign up.
Sign up to join this communityI'm trying to add an ID to a link created by JHTML. Is that possible? Here's my call, is there some way I can do a , #myId
as part of the below?
<?php echo JHtml::_('icon.edit', $displayData['item'], $displayData['params']); ?>
Assuming you want to add an attribute to the resulting anchor tag, pass another argument, an array with attributes as keys and their values as values:
echo JHtml::_('icon.edit', $displayData['item'], $displayData['params'], ['id' => 'myId']);