Font Awesome in News template

December 2012 Joomla Template
Rate this topic: Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.1.00 out of 6 based on 1 vote(s)
GK User
Mon May 12, 2014 12:30 am
Reply with quote
Report this post
As far as I can tell, Font Awesome is not included in the News template, correct?

I've been trying to use it in Module titles and have not been entirely successful. After installing NS Font Awesome I could get the icon to display in the module title ONLY when an article is published which includes a Font Awesome icon. With the article unpublished, it goes away. I've tried adding some custom css (for the .fa and the .fa-envelope:before) in the template's Advanced section but it didn't help.

The method I used to get the icon code in the menu title is a RokCandy macro which replaces the macro with a class html.

It appears the publishing of the article with the Font Awesome icon activates some code within the page but does not activate that same code when inserted in the module title. Any ideas on how to get it to work?
User avatar
Junior Boarder

GK User
Mon May 12, 2014 5:24 am
Reply with quote
Report this post
That is true - News doesn't support font awesome ootb.
With the NS Font Awesome - it is 3rd party plugin and I don't know how it works. Please check if it behaves same on default beeze template - if so - then ask plugins author for support.
But from what you say I think that using "macro" in module content includes correct files into body, while using macro in titles just doesn't work as Joomla doesn't support macros in titles.
User avatar
Moderator

GK User
Mon May 12, 2014 1:57 pm
Reply with quote
Report this post
The macro component does work in titles. It can be used to insert something simple like a line break or a little more complex, like: <i class="{class}">{text}</i>

I tried it on the default Beeze template with the same results. The code shows up in the module title, but without the code that NS Font Awesome inserts, nothing displays until an article is published on the page with the Font Awesome class. Any ideas on how to get the needed code that NS Font Awesome inserts? The developer provides no documentation or support (unless subscribed, for a fee).
User avatar
Junior Boarder

GK User
Mon May 12, 2014 3:14 pm
Reply with quote
Report this post
Sorry but we don't provide support for 3rd party extensions.
I might suggest to use standard FontAwesome files.
You would need to download FA package, put it inside template folder (copy files from css and fonts of font-awesome package to template folder - same subfolders), then include font-awesome css inside file:
templates/gk_news/layouts/blocks/head.php
so it the css including part looks this way:
Code: Select all
$template_style = $this->getTemplateStyle('style');
// load the CSS files
$this->API->addCSS($this->API->URLtemplate() . '/css/k2.css');
$this->API->addCSS($this->API->URLtemplate() . '/css/normalize.css');
$this->API->addCSS($this->API->URLtemplate() . '/css/layout.css');
$this->API->addCSS($this->API->URLtemplate() . '/css/joomla.css');
$this->API->addCSS($this->API->URLtemplate() . '/css/system/system.css');
$this->API->addCSS($this->API->URLtemplate() . '/css/template.css');
$this->API->addCSS($this->API->URLtemplate() . '/css/menu/menu.css');
$this->API->addCSS($this->API->URLtemplate() . '/css/gk.stuff.css');
$this->API->addCSS($this->API->URLtemplate() . '/css/font-awesome.min.css');
$this->API->addCSS($this->API->URLtemplate() . '/css/style'.$template_style.'.css');

where:
Code: Select all
$this->API->addCSS($this->API->URLtemplate() . '/css/font-awesome.min.css');

is the added line.
User avatar
Moderator

GK User
Wed May 14, 2014 2:24 pm
Reply with quote
Report this post
That works, thank you.
User avatar
Junior Boarder

GK User
Wed May 14, 2014 5:23 pm
Reply with quote
Report this post
The solution with adding css from FontAwesome solved your case?
User avatar
Moderator


cron