Well, there am I trying to convince joomla 1.5 to use my template’s favicon instead of the default jommla flower . But no matter what it wouldn’t let me replace it by my own. What I’ve done so far:
- create the .ico file with Gimp, 32×32 (tried 16×16 also), 4 bpp 16-slot palette
- placed it in ../templates/my_template/favicon.ico
- reloaded page in browser
But still no favicon is shown in neither Opera nor Firefox under Windows.
Update: It seams I somehow used wrong colour palette, layer or whatever optioins. After I uploaded a png file to FavIcon and used the result it at least shows in Firefox. Opera seams to chuck up on the HTML header created by Joomla:
<head> [...] <title>Welcome to the Frontpage</title> [...] <link href="/joomla/templates/div_template/favicon.ico" rel="shortcut icon" type="image/x-icon" /> [... repeated multiple times somehow ...] <link rel="stylesheet" href="http://localhost/joomla/templates/div_template/css/template_css.css" type="text/css"/> <link rel="shortcut icon" href="http://localhost/joomla/images/favicon.ico" /> <link href="/joomla/css/template.css" rel="stylesheet" type="text/css" /> </head>
As far as my understanding goes Opera doesn’t mistaken as to overwrite the earlier favicon.ico link with the later and hence (as Opera does) show the correct, i.e. intended favicon for a glimpse of a second and than show none as the /joomla/images/ one is not there. If I place a copy in that directory on the server Opera also shows the icon — I asume the wrong one though!
Well, anyway, now I know where the rub is…
Update 2008/05/08: I should have digged into templating a bit further and not just take it “as is”. Now in the html header of .../templates/my_template/index.php
I just leave out the line where it points to the joomla template but rather only have one “shortcut icon” href as below:
<head> <jdoc:include type="head" /> <link rel="stylesheet" href="<?php echo $this->baseurl ?>/templates/system/css/system.css" type="text/css" /> <link rel="stylesheet" href="<?php echo $this->baseurl ?>/templates/system/css/general.css" type="text/css" /> <link rel="stylesheet" href="<?php echo $this->baseurl ?>/templates/<?php echo $this->template ?>/css/layout.css" type="text/css" /> <link rel="stylesheet" href="<?php echo $this->baseurl ?>/templates/<?php echo $this->template ?>/css/typography.css" type="text/css" /> <link rel="stylesheet" href="<?php echo $this->baseurl ?>/templates/<?php echo $this->template ?>/css/browserhacks.css" type="text/css" /> <link rel="shortcut icon" href="<?php echo $this->baseurl ?>/templates/<?php echo $this->template ?>/icon/favicon.ico" /> </head>