Page 1 of 2
Changing the default favicon
Posted: Mon Nov 05, 2012 11:05 am
by LauraG
We would like to change the default profound ui shortcut favicon to our own one, is there any way to do this?
Thanks for your help
Re: Changing the default favicon
Posted: Mon Nov 05, 2012 11:09 am
by David
Yes. The best way is to specify this with a link tag in the "start.html" page, like this:
Code: Select all
<link rel="shortcut icon" href="/yourpath/yourfile.ico" />
Profound UI adds a default icon by shipping a "favicon.ico" in the HTTP server document root, but you won't want to replace this, as it will get overwritten on each update to the product.
Re: Changing the default favicon
Posted: Mon Nov 05, 2012 11:17 am
by LauraG
Thanks, that worked perfectly.
Re: Changing the default favicon
Posted: Sat Jul 26, 2014 7:20 am
by Bruno97
Hi,
Actually, it does not work in Atrium.
Customizing the start.html file makes the customized favicon appear only when a Rich Display File is open in a new browser tab (outside the Atrium context).
Does it work the same way with you ?
Bruno
Re: Changing the default favicon
Posted: Sat Jul 26, 2014 9:15 pm
by Scott Klement
Right, not everyone uses Atrium. The original question was not about how to do this in Atrium, it was about the Rich Display module... (Which at the time was confusingly called "Profound UI" -- the same name as the suite of products.)
Re: Changing the default favicon
Posted: Mon Jul 28, 2014 5:04 pm
by Scott Klement
If you did want to change the default favicon within Atrium only (and not other Profound UI pages) you could do so by adding some JavaScript that runs when the Atrium menu screen has loaded. You can do that by declaring an Atrium.onload function in a JavaScript file. If you place the JavaScript file in the /www/YOUR-INSTANCE/htdocs/profoundui/userdata/extension/atrium directory of the IFS, Atrium will run it automatically.
For example, I created a file named "scott.js" and put it in the /www/profoundui/htdocs/profoundui/userdata/extension/atrium directory, containing the following code:
Code: Select all
Atrium.onload = function() {
var oldIcon = document.getElementById("atrium-favicon");
if (oldIcon) {
document.head.removeChild(oldIcon);
}
var newIcon = document.createElement("link");
newIcon.id = "atrium-favicon";
newIcon.rel = "shortcut icon";
newIcon.href = "/scott.ico";
document.head.appendChild(newIcon);
}
When this runs, it changes the icon to "scott.ico". So, whenever the Atrium menu page is displayed, I get "scott.ico" instead of the default (which is /favicon.ico)
Re: Changing the default favicon
Posted: Tue Jul 29, 2014 4:22 pm
by Bruno97
Thanks a ton Scott !
It works very well. However, I can see the Profound icon (during the load of the "Atrium Web Portal Sign On" page) at first and then it's replaced in a blink of an eye by mine.
Bruno
Re: Changing the default favicon
Posted: Tue Jul 29, 2014 4:40 pm
by Scott Klement
The Atrium login page is an HTML file that you can change (to use the <link> tag as discussed earlier in this thread.) You can change it here:
/www/YOUR-INSTANCE/htdocs/profoundui/userdata/html/atrium_login.html
The other technique (with Atrium.onload) was for the menu screen (which doesn't have an HTML file that you can edit.)
Re: Changing the default favicon
Posted: Tue Jul 29, 2014 5:14 pm
by Bruno97
Scott,
That's exactly what I have done.
But I still first see my icon, then the Profound Logic's, then mine again.
I must say I am at home right now on a remote PC connection, which surely slows down things enough... to let me see what I would probably not see if I was at the office.
I will see tomorrow...
Bruno
Re: Changing the default favicon
Posted: Tue Jul 29, 2014 5:24 pm
by Scott Klement
Oh, I see.. because the default one will show until the onload() code runs.
Well, you could always replace /www/YOUR-INSTANCE/htdocs/favicon.ico with your icon...