No Code Attached Yet
avatar mariantanase
mariantanase
8 Mar 2022

Hi,
How can be enable Bootstrap 5 tooltips style on Joomla (Cassiopeia) template ?

avatar mariantanase mariantanase - open - 8 Mar 2022
avatar joomla-cms-bot joomla-cms-bot - change - 8 Mar 2022
Labels Added: No Code Attached Yet
avatar joomla-cms-bot joomla-cms-bot - labeled - 8 Mar 2022
avatar Quy Quy - close - 8 Mar 2022
avatar Quy Quy - change - 8 Mar 2022
Status New Closed
Closed_Date 0000-00-00 00:00:00 2022-03-08 15:11:03
Closed_By Quy
avatar mariantanase
mariantanase - comment - 8 Mar 2022

Thanks for closing the issue, but the documentation doesn't explain (with examples) for a simple user, how to implement this. You could have given some examples.

avatar drmenzelit
drmenzelit - comment - 8 Mar 2022

@mariantanase where do you want to add tooltips?

avatar mariantanase
mariantanase - comment - 9 Mar 2022

@mariantanase where do you want to add tooltips?

Hi @drmenzelit ,
I want to use it inside articles

avatar drmenzelit
drmenzelit - comment - 9 Mar 2022

Then you need to look at the documentation from Bootstrap:
https://getbootstrap.com/docs/5.1/components/tooltips/#examples

Quy showed above how to load tooltips in Joomla.

avatar mariantanase
mariantanase - comment - 9 Mar 2022

I know, the bootstrap page I use it everyday on my projects.
Even after inserting references to the bootstrap.bundle javascript file into Cassiopeia, it doesn't work.
If I add that code:
use Joomla\CMS\HTML\HTMLHelper::_('bootstrap.tooltip', '.selector', []);
on index.php, it show an error.

avatar brianteeman
brianteeman - comment - 9 Mar 2022

Where does it say to put use at the beginning

avatar mariantanase
mariantanase - comment - 9 Mar 2022

Where does it say to put use at the beginning

Thanks @brianteeman !
I had seen in the index.php that the first lines used "use", and I thought I was using it. Instead you were right.
Using only the:
\Joomla\CMS\HTML\HTMLHelper::_('bootstrap.tooltip', '.btn', []);
it works fine! Thanks again.

avatar brianteeman
brianteeman - comment - 9 Mar 2022

Trust the documentation - its not always wrong

avatar dmurphy779
dmurphy779 - comment - 21 Jun 2023

I was too confuoozed. Not sure how it works but it does. To be clear to others, adding a bootstrap component such as TABS looks like this in Cassiopia's index.php override file:

use Joomla\CMS\Factory;
use Joomla\CMS\HTML\HTMLHelper;
use Joomla\CMS\Language\Text;
use Joomla\CMS\Uri\Uri;

\Joomla\CMS\HTML\HTMLHelper::_('bootstrap.tab', '.selector', []);____

This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/37230.
avatar chmst
chmst - comment - 21 Jun 2023

Thank you for sharing.

You can just write


use Joomla\CMS\Factory;
use Joomla\CMS\HTML\HTMLHelper;
use Joomla\CMS\Language\Text;
use Joomla\CMS\Uri\Uri;

HTMLHelper::_('bootstrap.tab', '.selector', []);____

as the HTMLHelper class is already defined.
But as I too had to search for that, it remembers me to add it to documentation.

Add a Comment

Login with GitHub to post a comment