<?php
$title = '<img src="...">';
echo HTMLHelper::_('uitab.startTabSet', 'myTab', ['active' => 'active-1']);
echo HTMLHelper::_('uitab.addTab', 'myTab', 'active-1', $title);
echo 'Test1';
echo HTMLHelper::_('uitab.endTab');
echo HTMLHelper::_('uitab.addTab', 'myTab', 'active-2', $title);
echo 'Test2';
echo HTMLHelper::_('uitab.endTab');
echo HTMLHelper::_('uitab.endTabSet');
?>
Clicking on the image changes the tab.
Uncaught TypeError: e.target.hash is undefined (joomla-tab.js:233:32)
Solution: joomla-projects/custom-elements#164
Labels |
Added:
?
|
Hi @dgrammatiko , thanks for your answer. I needed flexible images, defined by the user in the article. So I think it's not unlikely to have sometimes HTML there.
Status | New | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2021-07-05 17:29:20 |
Closed_By | ⇒ | bembelimen |
There are way more serious problems with tabs and alerts, hopefully #33234 will sort things out
FWIW the title should be expected ALWAYS to be text, not HTML. If you need to add icons, CSS is extremely viable