Fontawesome Icons - Do I need to reinstall if it's already used by CB?

2 years 7 months ago #325891 by marriage_minded_man
I'd like to use Fontawesome icons throughout Joomla and read that it's already being used by CB.

In this case do I need to download and reference the FA CSS file or is there a way to just reuse what's already installed in other areas of Joomla (non-CB-related)?

Specifically, I'd like to use it directly related to a Joomla Menu Item, ideally by editing the "Class" field on the Menu Item itself by adding the icon class.

I don't mind using CSS "content" if need be and doing it from the CSS file, either way. I just need to know if I should download and reference FA separately (whether that would cause conflicts with the FA-icons of CB) or if I can reuse whats already installed. And whether all icons are available, and which version of FA is being used.

Thanks.

Please Log in to join the conversation.

2 years 7 months ago #325896 by krileon
CB only loads fontawesome when CB is loaded and we namespace our fontawesome behind the cb_template class. So as long as you keep those things in mind yes you can use it anywhere you like that CB is loaded. To use it throughout your site though it's best to load fontawesome v4 (we do not use v5) within your Joomla template then turn CBs off in CB > Configuration > Integrations.


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.

Please Log in to join the conversation.

2 years 7 months ago - 2 years 7 months ago #325902 by marriage_minded_man
Thanks Kyle. I am able to use FA icons in the native Joomla menu by adding something like this to the CSS file:
nav.navigation > div.nav-collapse > ul > li.item-123 a:before {
	content: "\f060";
	display: inline-block;
    	font-family: "FontAwesome";
    	position: relative;
    	padding-right: 1em;
    	font-size: 1em;
}

And it seems to work perfectly. And sure enough, if I disable the CB Fontawesome (as you mentioned), the icons are not loaded, so I can confirm this method is utilizing the CB install of Fontawesome 4.

This method seems to show the icons on every page (regardless of whether I see a CB element loaded or not). Which leads me to ask, on which pages is CB loaded (how do I tell)?

I tried doing a find for "cb_template" in the page source code, but couldn't find it. I do have CB menu items loaded, so maybe that's it?

I'd rather just use this method instead of having to load Fontawesome again on my own, but I'm not sure if there will be some obscure page where CB is not loaded somewhere deep in the site.

Thanks.

Please Log in to join the conversation.

2 years 7 months ago #325905 by marriage_minded_man
Just found a page where the icons don't load (the payment cancelled page for CBSubs).

/component/comprofiler/pluginclass/cbpaidsubscriptions?cbpmethod=cancelpay...

Please Log in to join the conversation.

2 years 7 months ago #325909 by krileon

This method seems to show the icons on every page (regardless of whether I see a CB element loaded or not). Which leads me to ask, on which pages is CB loaded (how do I tell)?

If you've a CB module like the CB Login Module loaded on every page for example then CBs template will also be loaded on every page. Easiest way to guarantee it'll load is create a CB Content Module, enable loading of CBs template, place it in the footer of the page for example, and have it display on every page.

Just found a page where the icons don't load (the payment cancelled page for CBSubs).

That's strange given that is within CB itself.


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.
The following user(s) said Thank You: marriage_minded_man

Please Log in to join the conversation.

Moderators: beatnantkrileon
Time to create page: 0.210 seconds

Facebook Twitter LinkedIn