cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

How to set favicon in backoffice?

Former Member
0 Kudos
2,718

Hi, we want to set a favicon for backoffice but there doesn't seem to be a property or controller to manage that.

Any help is appreciated.

Accepted Solutions (1)

Accepted Solutions (1)

former_member625836
Active Contributor

Hi ,

Since 1811 you can change it with cockpitng.mainpage.favicon property. In older versions you would actually have to modify cockpit.zul file which present in cockpitframework.jar file.

Cheers, Jacek

vaibhav_kumbhar
Discoverer
0 Kudos

Hi Jacek,

I am on Hybris 1905, I tried using cockpitng.mainpage.favicon property but did not work for me. Could you please tell which directory should I place my icon and what should be the value that goes against this property.

Thanks

Answers (3)

Answers (3)

vaibhav_kumbhar
Discoverer
0 Kudos

I was able to this using the property - backoffice.cockpitng.mainpage.favicon

0 Kudos

Hello there,

In order to set a favicon in Backoffice follow these steps:

  1. Create the favicon and place it somewhere in your custom storefront extension (e.g /web/webroot/_ui/responsive/common/theme-primary/favicons/backoffice-favicon.ico).
  2. Define a localized property "img.favIcon" in your .properties (e.g theme-primary-desktop-properties) and set the uri of the file. img.favIcon=/_ui/responsive/theme-primary/favicons/backoffice-favicon.ico
  3. Make sure that method getFavIcon of FavIconController returns the proper icon path (the one set in the property).
  4. Declare a variable from the property "img.favIcon" and add a link tag in the <head> of master.tag
<spring:theme code="img.favIcon" text="/" var="favIconPath"/> 
...
<link rel="shortcut icon" type="image/x-icon" media="all" href="${favIconPath}" />
...

Hope it helps!

VinayKumarS
Active Contributor
0 Kudos

you can apply styles.. along with that you can also add icons. use below thread.

https://answers.sap.com/questions/12769359/how-to-include-custom-fontscss-into-backoffice.html?child...