Expand my Community achievements bar.

Radically easy to access on brand approved content for distribution and omnichannel performant delivery. AEM Assets Content Hub and Dynamic Media with OpenAPI capabilities is now GA.

How to disable favicon for particular country site in aem?

Avatar

Level 2

hello,

I have two countries us/en and in/en. The favicon is visible for us/en but not visible for in/en so I just want to know how we can do this enable and disable thing?

2 Replies

Avatar

Level 6

Hi @prachimathur ,

The favicon icon is typically loaded in the <head> section of a website. Usually, this involves an HTML snippet with a link element like:

<link rel="icon" type="image/x-icon" href="/path/to/your/favicon.ico">

To understand the actual loading process for your site, examine the head.html and associated HTML files. For US the favicon icon may be loaded as it is able to find the asset but not for IN . You can customize the script for your site to  enable/disable the same.

 

Thanks,

Somen

 

Avatar

Level 4

Hi @prachimathur ,

You can put a sightly condition during providing href parameter. You can take currentPage.path and compare if you want certain country to be part of it.

example: 

<link data-sly-test.iconName="${'/content/we-retail/en' in currentPage.path ? 'en.ico' : 'other.ico'}" rel="icon" href="/content/dam/anyPath/${iconName}" type="image/x-icon"/>