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?
Solved! Go to Solution.
Views
Replies
Total Likes
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
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
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"/>
Hi all, Is there any way to author favicon without making any code changes?
Hi @prachimathur ,
fav icon display from template page
In general we override the core page component in our project, add/made changes in required files.
In AEM 6.5 based on version used it is present in head.resources.html
You may override this head.resources.html
You may have a look below thread as well
If you are using AEM cloud then you may find /libs/core/wcm/components/page/v2/page/head.resources.html
It is very easy to override just copy paste that file in your project page component, there might be already few files like body.html,customfooterlibs.html, etc
Thanks
Views
Likes
Replies