Monday, 12 October 2015 01:19

Adding a favicon to the Joomla T3 framework

One of the annoying bugs of the T3 framework is that it over writes the favicon everytime the framework is updates. To fix this, upload the favicon outside of your template directory. In decided to upload it directly into th root template folder.

Firstly, I put the variable $path at the top of the head. This is only neccassary if you want to dynamically insert the URL - But it's handy to do so, and I suggest you do, otherwise you would have to type the full absolute path.

<?php
$app = JFactory::getApplication();
$path = JURI::base(true).'/templates/'.$app->getTemplate().'/';
?>

 

Put the following into the head block, but make sure it comes after the call to load the T3 head:

<link rel="shortcut icon" href="<?php echo $path; ?>../favicon.ico" />

 

My head block looks something like this:

<?php
// T3 BASE HEAD
$this->addHead();
?>

<link rel="shortcut icon" href="<?php echo $path; ?>../favicon.ico" />
Published in Blog
Friday, 09 October 2015 23:30

Get the active template path

Stick this in the head:

<?php
$app = JFactory::getApplication();
$path = JURI::base(true).'/templates/'.$app->getTemplate().'/';
?>

and call it using the $path variable:

<?php echo $path; ?>
Published in Blog

I knocked up this video explaining how the "read more" divider in k2 works, and how it can effect content that contains elements such as lists within the intro text.

Published in Blog
Tuesday, 23 June 2015 23:33

Module position anywhere

The following snippet will create a module position. Place this inside any file, including view files. Replace the text my-new-position with the name of your new module position.

Published in Blog
Page 2 of 2