Adding a Favicon

Favicons are the little images you have to the left of the URL in the URL bar. If you’re reading this through WordPress you should see a white “W” inside a blue circle. That is the WordPress Favicon.

The absolutely easiest way to add a Favicon is to add the image to the root folder of the web server. If you’re using IIS the default would be “C:\inetpub\wwwroot\”. Add the Favicon, flush the cache and reload Cognos. You should now see the Favicon.

This works great, but what happens if you have more than one site, or if you want different Favicons for different skins? You’ll need to modify the XSL.

While Cognos can (and probably should) be used with Firefox, a majority of users still use IE. So the favicon must be in the Microsoft Icon filetype (.ico).

To begin, decide which skin has what favicon and place them under ..\portal\images\ for each skin.

Next backup and open ..\templates\ps\logicsheets\presentation\main\presentation.xls

Search for “mt:stylesheet”. It should be on line 68. I’ll be entirely honest, I don’t know what this choose expression is testing. Either way, add the following line after the last stylesheet link in the “otherwise group”

<link rel="shortcut icon" href="{'{$skin_images}'}favicon.ico"/>

Restart Cognos and check if it works.

I’ve added the IBM favicon to the business skin and added the portal to my favorites:

Now I’ve added the Google favicon to the classic skin, and switched to it:

The favicons in the tab and the URL bar are immediately updated. However the favicons in the favorites will stay with the previous icon. Easy enough to fix – delete and re-add the favorite.

A few postscripts:
It’s worth noting that while this was testing on Cognos 10, I have no reason to believe it would not work on Cognos 8.
This method also relies on modifying Cognos internals. This will need to be redone every time you upgrade.
Also, make sure you make a backup of any file you modify.


3 Responses to Adding a Favicon

  1. sai says:

    HI Paul,
    Good Morning.

    I have a question , we are experenicing some image issue . So i have configured webdav and it is resolved users are able to pull image and run in html , but not in pdf and excel.
    Do you have any information on this. in the url path if i keep maually add relative path some thing like ../samples/mages/ then i can run in all formats. But whereas c:\PF\ibm\cognos\samples\images path is having issues with pdf. Mail on Thanks for your support.

    • CognosPaul says:

      Hi Sai,

      There are many possible causes for this. Things to check, are you using SSL? Is this a distributed installation? Does anonymous have access to the image folder?

  2. jurinhoo says:

    Great article, will help me add 256×256 icons for Chrome. However, note that admin page won’t use this logicsheet, as do some other pages. Best still to simply drop favicon.ico in your root folder (and make sure it doesnt automatically redirect as is normally set default for the root)

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: