0

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']); ?>
1
  • "Any additinal parameters passed to JHtml::_() will be passed as parameters themselves to the resolved method." Can you show your method declaration? Commented Mar 17, 2019 at 10:12

1 Answer 1

1

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']);
0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.