Search
Other Tabs & Accordions questions
Forum

Font icon before title

Lorenzo Rossini's Avatar Lorenzo Rossini
Hi,
is there any way to add an icon font (Font Awesome library is already installed in my template) before accordion title?

I've tried several configurations with ReReplace, but it doesn't work, I don't know why.
The other solution is to add pseudo-class ::before to my title with icon's unicode character as property, but I'm limited to outlined icons (I need to display icons from the “solid” family).

Since titles are "enclosed" in a snippet, how can I add additional code to the accordion title?

Thanks,
Lorenzo
Peter van Westen's Avatar Peter van Westen ADMIN
You could use CSS to add the icon via the before pseudo-class.
Or add a <span> before the title with the required classes.

What CSS and or classes you need for the icon is down to the Font Awesome implementation. That has nothing to do with Tabs & Accordions.
Please post a rating at the Joomla! Extensions Directory
Lorenzo Rossini's Avatar Lorenzo Rossini
Or add a <span> before the title with the required classes.
OK, but how do you put a tag before the title when the title is in a snippet? If I insert the tag before the snippet, the icon is outside the title.
What CSS and or classes you need for the icon is down to the Font Awesome implementation. That has nothing to do with Tabs & Accordions.
Because the problem could be solved if Font Awesome's unicode code also handled "solid" icons type, in this case I could use pseudo-class. But that's not the case, with their unicode I can display only "outlined" icons type, so I have to insert a tag (<i> or <span>) before the title..
Peter van Westen's Avatar Peter van Westen ADMIN
Not sure what you mean with that snippet thing.
Why not place the span inside the snippet then?

Regarding the CSS for font awesome, that's a question you would have to ask the internet.
Please post a rating at the Joomla! Extensions Directory
Lorenzo Rossini's Avatar Lorenzo Rossini
Why not place the span inside the snippet then?

Confidential information:
(hidden)

Regarding the CSS for font awesome, that's a question you would have to ask the internet.
yes, it was just to give you an explanation...
Peter van Westen's Avatar Peter van Westen ADMIN
You should put the <span> inside the title attribute!
Please post a rating at the Joomla! Extensions Directory
Lorenzo Rossini's Avatar Lorenzo Rossini
... of course, I should have thought of it before! Thanks 🙂
You can only post on the extension support forum if you have an active subscription and you log in

Buy a Pro subscription