The Joomla! Forum ™



Forum rules


Please use the mailing list here: http://groups.google.com/group/joomla-dev-general rather than this forum.



Post new topic Reply to topic  [ 4 posts ] 
Author Message
PostPosted: Sat May 05, 2012 10:50 am 
Joomla! Intern
Joomla! Intern

Joined: Tue Jul 11, 2006 8:17 pm
Posts: 55
Problem:
I wish to overwrite the location from the "image/vnd.microsoft.icon" in the templates I create. The reason is, that my customers use there own favicon and didn´t wish every time they deploy a template update to overwrite the favicon which came with my template.

Current situation:
Per default joomla 2.5 added the following line (if you use <jdoc:include type="head" />):
Code:
<link href="/templates/mytemplate/favicon.ico" rel="shortcut icon" type="image/vnd.microsoft.icon" />


My try:
If I now added the line:
Code:
$this->addFavicon('/favicon.ico', 'image/vnd.microsoft.icon', 'shortcut icon');


I end up with two icons:
Code:
  <link href="/favicon.ico" rel="shortcut icon" type="image/vnd.microsoft.icon" />
  <link href="/templates/mytemplate/favicon.ico" rel="shortcut icon" type="image/vnd.microsoft.icon" />


Is this a bug?!?!


Top
 Profile  
 
PostPosted: Mon May 07, 2012 3:39 am 
User avatar
Joomla! Intern
Joomla! Intern

Joined: Sun Feb 25, 2007 10:07 pm
Posts: 58
Location: @nchamilton
when joomla loades a template it checks if 'favicon.ico' is in the directory.

If the file exists it will call addFavicon.

if you call addFavicon 10 times, you will see 10 entries in your html.

If you just remove or rename the favicon.ico in the template, then the first entry should be removed.

If you want to then you could link to the new name if you do not have one from the user.

another way could be to look through the document head array and update the value.

_________________
http://www.conquerjoomla.com<--- Click to Conquer Joomla!
https://twitter.com/#!/nchamilton <--- Follow me on twitter


Top
 Profile  
 
PostPosted: Mon May 07, 2012 9:42 am 
Joomla! Intern
Joomla! Intern

Joined: Tue Jul 11, 2006 8:17 pm
Posts: 55
Ah, so if I build templates without a favicon.ico and point to the root in my template, this issue should then fixed?

If this is the case then I own you a beer :D.


Top
 Profile  
 
PostPosted: Mon May 07, 2012 9:56 am 
User avatar
Joomla! Intern
Joomla! Intern

Joined: Sun Feb 25, 2007 10:07 pm
Posts: 58
Location: @nchamilton
In theory, let me know how it goes

_________________
http://www.conquerjoomla.com<--- Click to Conquer Joomla!
https://twitter.com/#!/nchamilton <--- Follow me on twitter


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 



Who is online

Users browsing this forum: AviMoto, worknmn and 3 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
Powered by phpBB® Forum Software © phpBB Group