0
Welcome Guest! Login
0 items Join Now

Add favicon links to header

    • Luke Douglas's Avatar
    • Luke Douglas
    • Hero Rocketeer
    • Posts: 322
    • Thanks: 15
    • Another Old Hack!

    Add favicon links to header

    Posted 8 years 11 months ago
    • I have several favicons that I want to add to several of my client Joomla / Gantry websites. I know I can add this to the 'index.php' file in my Gantry template but I was wondering if there is a way I can add this via custom HTML in the 'templates/gantry/html' folder or possibly to convert this to JS 'document.write' statements, save to a 'favicon.js' file and then embed using something like "<?php $gantry->addScript('favicons.js');> "?

      Basically, just want to know if there is a way that would not be overwritten by future updates on the Gantry template.

      Here is the code:
      <link rel="apple-touch-icon" sizes="57x57" href="/apple-touch-icon-57x57.png">
      <link rel="apple-touch-icon" sizes="60x60" href="/apple-touch-icon-60x60.png">
      <link rel="apple-touch-icon" sizes="72x72" href="/apple-touch-icon-72x72.png">
      <link rel="apple-touch-icon" sizes="76x76" href="/apple-touch-icon-76x76.png">
      <link rel="apple-touch-icon" sizes="114x114" href="/apple-touch-icon-114x114.png">
      <link rel="apple-touch-icon" sizes="120x120" href="/apple-touch-icon-120x120.png">
      <link rel="apple-touch-icon" sizes="144x144" href="/apple-touch-icon-144x144.png">
      <link rel="apple-touch-icon" sizes="152x152" href="/apple-touch-icon-152x152.png">
      <link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon-180x180.png">
      <link rel="icon" type="image/png" href="/favicon-32x32.png" sizes="32x32">
      <link rel="icon" type="image/png" href="/android-chrome-192x192.png" sizes="192x192">
      <link rel="icon" type="image/png" href="/favicon-96x96.png" sizes="96x96">
      <link rel="icon" type="image/png" href="/favicon-16x16.png" sizes="16x16">
      <link rel="manifest" href="/manifest.json">
      <meta name="msapplication-TileColor" content="#800000">
      <meta name="msapplication-TileImage" content="/mstile-144x144.png">
      <meta name="theme-color" content="#ffffff">

      Here is the javascript code:


      document.write("<link rel=\"apple-touch-icon\" sizes=\"57x57\" href=\"\/apple-touch-icon-57x57.png\">");
      document.write("<link rel=\"apple-touch-icon\" sizes=\"60x60\" href=\"\/apple-touch-icon-60x60.png\">");
      document.write("<link rel=\"apple-touch-icon\" sizes=\"72x72\" href=\"\/apple-touch-icon-72x72.png\">");
      document.write("<link rel=\"apple-touch-icon\" sizes=\"76x76\" href=\"\/apple-touch-icon-76x76.png\">");
      document.write("<link rel=\"apple-touch-icon\" sizes=\"114x114\" href=\"\/apple-touch-icon-114x114.png\">");
      document.write("<link rel=\"apple-touch-icon\" sizes=\"120x120\" href=\"\/apple-touch-icon-120x120.png\">");
      document.write("<link rel=\"apple-touch-icon\" sizes=\"144x144\" href=\"\/apple-touch-icon-144x144.png\">");
      document.write("<link rel=\"apple-touch-icon\" sizes=\"152x152\" href=\"\/apple-touch-icon-152x152.png\">");
      document.write("<link rel=\"apple-touch-icon\" sizes=\"180x180\" href=\"\/apple-touch-icon-180x180.png\">");
      document.write("<link rel=\"icon\" type=\"image\/png\" href=\"\/favicon-32x32.png\" sizes=\"32x32\">");
      document.write("<link rel=\"icon\" type=\"image\/png\" href=\"\/android-chrome-192x192.png\" sizes=\"192x192\">");
      document.write("<link rel=\"icon\" type=\"image\/png\" href=\"\/favicon-96x96.png\" sizes=\"96x96\">");
      document.write("<link rel=\"icon\" type=\"image\/png\" href=\"\/favicon-16x16.png\" sizes=\"16x16\">");
      document.write("<link rel=\"manifest\" href=\"\/manifest.json\">");
      document.write("<meta name=\"msapplication-TileColor\" content=\"#800000\">");
      document.write("<meta name=\"msapplication-TileImage\" content=\"\/mstile-144x144.png\">");
      document.write("<meta name=\"theme-color\" content=\"#ffffff\">");
      
    • Just another old hacker!
    • Damir's Avatar
    • Damir
    • Preeminent Rocketeer
    • Posts: 22450
    • Thanks: 2679
    • Web Developer

    Re: Add favicon links to header

    Posted 8 years 11 months ago
    • Luke Douglas's Avatar
    • Luke Douglas
    • Hero Rocketeer
    • Posts: 322
    • Thanks: 15
    • Another Old Hack!

    Re: Add favicon links to header

    Posted 8 years 11 months ago
    • Damir,

      I suspected this would be the reply! Thanks. :(

      Luke
    • Just another old hacker!

Time to create page: 0.039 seconds