Add custom favicon.ico to T3 bootstrap framework for Joomla!

When you are using the T3 bootstrap framwork for Joomla! to create a Joomla! responsive template, an easy way to use a custom favicon.ico is to just replace the file templates/t3_bs_blank/favicon.ico with your own.

This is fine – until you update the T3 framwork. Then your custom favicon.ico will be overwritten with the default file.

This is a solution:

  • Create an override of the file templates/t3_bs_blank/tpls/blocks/head.php and place it in templates/t3_bs_blank/local/tpls/blocks/head.php
  • Add the following code last in the file:
    <!-- LOCAL FAVICON.ICO -->
    <?php
    if (is_file(T3_TEMPLATE_PATH . '/local/favicon.ico')) {
    $this->addFavicon(T3_TEMPLATE_URL . '/local/favicon.ico');
    }
    ?>
    <!-- //LOCAL FAVICON.ICO -->
  • Now put your custom favicon.ico in templates/t3_bs_blank/local

Now your custom favicon.ico will survive updates of the T3 framework.

0 replies

Leave a Reply

Want to join the discussion?
Feel free to contribute!

Leave a Reply

Your email address will not be published. Required fields are marked *

sixteen + 14 =