[solved] Favicon at all pages using ie9 /...

For discussion and questions related to CMS Specific templates and stylesheets (CSS), and themes. or layout issues. This is not a place for generic "I don't know CSS issues"
Post Reply
User avatar
map_1961
Power Poster
Power Poster
Posts: 406
Joined: Fri Apr 20, 2007 7:26 pm

[solved] Favicon at all pages using ie9 /...

Post by map_1961 »

Hi folks.
In my 1.8.2 installation page favicon is shown on all pages of the site - even in ie9.
In the brand new 1.10.3. installation favicon is shown on home page only (using ie9).
I use this userdefined tag:

Code: Select all

if(isset($params['static']))
   echo '<link rel="shortcut icon" href="'.$params['static'].'" type="image/x-icon" />'."\n";

if(isset($params['animated']))
   echo '<link rel="icon" href="'.$params['animated'].'" type="image/gif" />'."\n";
... and this line in the template:

Code: Select all

{favicon static="images/favicon.ico"}
When i use the absolut path - in template - to the favicon like this...

Code: Select all

{favicon static="http://myserver/images/favicon.ico"}
... the favcion is shown using ie9 on subpages, too. Is there a way to replace the absolute path? Tried...

Code: Select all

{favicon static="[root_url]/images/favicon.ico"}
...already but this doesn't work.

Thanks for help

map_1961
Last edited by map_1961 on Wed Jul 25, 2012 7:17 pm, edited 1 time in total.
uniqu3

Re: Favicon at all pages using ie9 /doesn't like relative pa

Post by uniqu3 »

If you change the UDT to :

Code: Select all

if(isset($params['static']))
   echo '<link rel="shortcut icon" href="' . cmsms()->config['root_url'] . '/' . $params['static'].'" type="image/x-icon" />'."\n";

if(isset($params['animated']))
   echo '<link rel="icon" href="' . cmsms()->config['root_url'] . '/' .$params['animated'].'" type="image/gif" />'."\n";
Root url from config will be included.

Or assign {root_url} tag to variable like:

Code: Select all

{root_url assign='my_root'}
{favicon static="`$my_root`/images/favicon.ico"}
User avatar
map_1961
Power Poster
Power Poster
Posts: 406
Joined: Fri Apr 20, 2007 7:26 pm

Re: Favicon at all pages using ie9 /doesn't like relative pa

Post by map_1961 »

Hey - thank you - great job.

Thanks a lot.

map_1961
Post Reply

Return to “Layout and Design (CSS & HTML)”