iTop
iTop copied to clipboard
N°3777 - favicon: change easily favicon
Allow customization of favicon and logo depending on environment:
define them in XML first:
<brandings>
<branding id="default">
<main_favicon _delta="define">
<fileref ref="main_favicon_default"/>
</main_favicon>
<login_favicon _delta="define">
<fileref ref="login_favicon_default"/>
</login_favicon>
<portal_favicon _delta="define">
<fileref ref="portal_favicon_default"/>
</portal_favicon>
<portal_favicon _delta="define">
<fileref ref="portal_favicon_default"/>
</portal_favicon>
<main_logo _delta="define">
<fileref ref="main_logo_default"/>
</main_logo>
</branding>
<branding id="test_env">
<main_favicon _delta="define">
<fileref ref="main_favicon_test"/>
</main_favicon>
<login_favicon _delta="define">
<fileref ref="login_favicon_test"/>
</login_favicon>
<portal_favicon _delta="define">
<fileref ref="portal_favicon_test"/>
</portal_favicon>
<main_logo _delta="define">
<fileref ref="main_logo_test"/>
</main_logo>
</branding>
<brandings>
and then you can choose different favicon and logo using the configuration file:
// branding_environment: type of branding. usefull for put different logo depending environment
'branding_environment' => 'test',
( portal favicon can also be customized in module_design:
<module_designs>
<module_design id="itop-portal-customer" _delta="must_exist">
<properties>
<favicon _delta="define">
<fileref ref="logo_port_customer"/>
</favicon>
</properties>
</module_design>
</module_designs>
)
What about themes? They are defined under the <branding> node, we can't duplicate them in each new <branding id="xxx"> node.
Mind that favicon might not be a single file Check https://www.emergeagency.com/insights/detail/the-essentials-of-favicons/
And more recent: https://dev.to/masakudamatsu/favicon-nightmare-how-to-maintain-sanity-3al7