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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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