In Aware, once you get past the login page.....
The Business Space name is displayed in the main Browser Tab.
I expected to be able to change this to, say, MY_APP_NAME by adding <title>MY_APP_NAME</title> to both the Landing page and startup.html
Landing page works fine until you log in.
And initially works in startup.html but as soon as the app opens properly... it is changed to the Business Space name...
Any ideas where this is being changed by Aware?
Setting App name in Browser Tab
-
- Posts: 2414
- Joined: Mon Jul 02, 2012 12:24 am
- Location: Ulaanbaatar, Mongolia
Setting App name in Browser Tab
Cheers,
Mark
_________________
AwareIM 6.0, 8.7, 8.8, 9.0 , MariaDB, Windows 10, Ubuntu Linux. Theme: Default, Browser: Arc
Upcloud, Obsidian....
Mark
_________________
AwareIM 6.0, 8.7, 8.8, 9.0 , MariaDB, Windows 10, Ubuntu Linux. Theme: Default, Browser: Arc
Upcloud, Obsidian....
Re: Setting App name in Browser Tab
I have written up a guide on this somewhere but can´t find it. The problem is as you have noticed that Aware changes the title/tab name after fully loading the app and/so what you need to do is fiddle with render scripts in VP´s and can´t remember where I placed it and can be anywhere really, the thing is it has to be AFTER the app is fully loaded. You can use JS setTimeout and setInterval as well to get it to execute the JS after x period of time. Not sure if the title/tab name is changed back to default when loading layouts and things like that, in that case you need to repeatedly change it via document.title.
This solution is a hack and I would also want to be able to set it in the Aware config tool or code instead so it´s always set to what we configured (same thing/problem with favicon).
This solution is a hack and I would also want to be able to set it in the Aware config tool or code instead so it´s always set to what we configured (same thing/problem with favicon).
Henrik (V8 Developer Ed. - Windows)
-
- Posts: 619
- Joined: Wed Jun 17, 2015 11:16 pm
- Location: Omaha, Nebraska
- Contact:
Re: Setting App name in Browser Tab
This code will handle setting the favicon and title. You can put it in a js file, such as favicon.js.
Code: Select all
(function() {
const link = document.createElement('link');
link.type = 'image/x-icon';
link.rel = 'shortcut icon';
link.href = 'Custom/CSS/MY_APP_NAME/favicon.ico';
document.getElementsByTagName('head')[0].appendChild(link);
setTimeout(function () {
document.title = "MY_APP_NAME";
},0);
})();
VocalDay Solutions - Agility - Predictability - Quality
We specialize in enabling business through the innovative use of technology.
AwareIM app with beautiful UI/UX - https://screencast-o-matic.com/watch/crfUrrVeB3t
We specialize in enabling business through the innovative use of technology.
AwareIM app with beautiful UI/UX - https://screencast-o-matic.com/watch/crfUrrVeB3t
-
- Posts: 2414
- Joined: Mon Jul 02, 2012 12:24 am
- Location: Ulaanbaatar, Mongolia
Re: Setting App name in Browser Tab
Thanx John.
Perfect.
Perfect.
Cheers,
Mark
_________________
AwareIM 6.0, 8.7, 8.8, 9.0 , MariaDB, Windows 10, Ubuntu Linux. Theme: Default, Browser: Arc
Upcloud, Obsidian....
Mark
_________________
AwareIM 6.0, 8.7, 8.8, 9.0 , MariaDB, Windows 10, Ubuntu Linux. Theme: Default, Browser: Arc
Upcloud, Obsidian....
Re: Setting App name in Browser Tab
So... where does this favicon.js file get put, and where do we tell it to go looking for it ?johntalbott wrote: ↑Fri Mar 20, 2020 4:54 pm This code will handle setting the favicon and title. You can put it in a js file, such as favicon.js.
Code: Select all
(function() { const link = document.createElement('link'); link.type = 'image/x-icon'; link.rel = 'shortcut icon'; link.href = 'Custom/CSS/MY_APP_NAME/favicon.ico'; document.getElementsByTagName('head')[0].appendChild(link); setTimeout(function () { document.title = "MY_APP_NAME"; },0); })();
and.. what about multi-tenant application, where different tenant has a different name & icon. ?
V8.8 / Windows / MySQL