We are creating multiple sites on a single umbraco installation. Each site will be for a different client although they are all affiliated with the same company they are all independent companies of their own. Therefore they can share templates, document types and macros. But they need different media, sitemaps, . This would include using their own favicon.
How does one go about setting up the favicons for a multiple site environment like this? Any help would be greatly appreciated.
If the sites are sharing the same master-template I guess you could place an upload field on your document type for the homepage for instance, where you can upload the favicon to and then fetch it using either a XSLT macro or by using umbraco:item. I would probably go for the umbraco:item on this one, since I think a string is returned when using the upload property...
Thank you for the suggestion I think that's the best way to handle it. For others that might need to know how to do it this worked great for me. I added the umbraco:Item field with the tag being written in the insertTextBefore and insertTextAfter fields like below. Now I can upload the favicon for each site and the MasterPage template takes care of the rest.
Darn it! I'm sorry Jan, I meant to click your post as the accepted solution to this issue. I clicked the wrong one and I don't see any way to change it.
The only problem with this solution is that your IIS logs are going to fill up with 404 request for /favicon.ico due to the fact that there isn't one at the root. So I'm going to work on a solution that returns a different favicon for each site that is root relative
You could probably place all the different favicon's in the root of your site and then make a dropdown property on your node where you can choose the favicon...
So you populate the fields with the exaxt names of those favicon's placed in the root like favicon1.ico, favicon2.ico etc.
and then you just need to use either umbraco:item or a macro to fetch the value.
I don't have that problem with Umbraco. However, we also use Sitefinity for some other sites and I ran into that issue there. Make sure you're using rel="shortcut icon" instead of just rel="icon". And, try putting a question mark (?) at the end of your favicon url. I won't pretend to know why this works and I don't remember where I found it (Somewhere on StackOverflow I'm sure). But it worked for me.
Multiple sites each with it's own favicon
We are creating multiple sites on a single umbraco installation. Each site will be for a different client although they are all affiliated with the same company they are all independent companies of their own. Therefore they can share templates, document types and macros. But they need different media, sitemaps, . This would include using their own favicon.
How does one go about setting up the favicons for a multiple site environment like this? Any help would be greatly appreciated.
Gregg
Hi Gregg,
You put the favicon.ico file somewhere specific for each site, and then use a link tag in the header to point the browser to its whereabouts, e.g.:
/Chriztian
Hi Gregg
If the sites are sharing the same master-template I guess you could place an upload field on your document type for the homepage for instance, where you can upload the favicon to and then fetch it using either a XSLT macro or by using umbraco:item. I would probably go for the umbraco:item on this one, since I think a string is returned when using the upload property...
/Jan
Hi Jan,
Thank you for the suggestion I think that's the best way to handle it. For others that might need to know how to do it this worked great for me. I added the umbraco:Item field with the tag being written in the insertTextBefore and insertTextAfter fields like below. Now I can upload the favicon for each site and the MasterPage template takes care of the rest.
Good Stuff!
Thanks Jan. Hi 5!
Darn it! I'm sorry Jan, I meant to click your post as the accepted solution to this issue. I clicked the wrong one and I don't see any way to change it.
Hi Gregg
Glad it worked for you - nevermind the solution thing. As long as your problem is solved I'm allright with that :-)
/Jan
The only problem with this solution is that your IIS logs are going to fill up with 404 request for /favicon.ico due to the fact that there isn't one at the root. So I'm going to work on a solution that returns a different favicon for each site that is root relative
Hi Ben
You could probably place all the different favicon's in the root of your site and then make a dropdown property on your node where you can choose the favicon...
So you populate the fields with the exaxt names of those favicon's placed in the root like favicon1.ico, favicon2.ico etc.
and then you just need to use either umbraco:item or a macro to fetch the value.
Hope that it makes sense.
/Jan
Couple of years too late but what about IE? IE 9 & 8 dont display favicons in sub directories. Was a work around for this found?
Aston,
I don't have that problem with Umbraco. However, we also use Sitefinity for some other sites and I ran into that issue there. Make sure you're using rel="shortcut icon" instead of just rel="icon". And, try putting a question mark (?) at the end of your favicon url. I won't pretend to know why this works and I don't remember where I found it (Somewhere on StackOverflow I'm sure). But it worked for me.
The tag should wind up looking like this:
If you're using the Umbraco:Item to out put the favicon tag it would look like this:
I hope this helps.
is working on a reply...