Open Jasmeet0108 opened 8 years ago
This is indeed a point to improve. Your solutions works but this is not an ideal option without any doubts. Although, since we can't really predict whether we currently have a page URL or a static resource with a random name, this makes it a bit difficult to solve this issue straight.
Anyways, I see the acceptable compromise: make static resources paths configurable externally with default preset. We even have a ready mechanism for this.
It's also possible to place your favicon in the assets folder in the webapplication like so;
public class CustomSpringConfiguration extends SpringConfiguration {
@Override
public void addResourceHandlers(ResourceHandlerRegistry registry) {
registry.addResourceHandler("/assets/**").addResourceLocations("/assets/");
registry.setOrder(-1);
super.addResourceHandlers(registry);
}
}
TSI-1940 (internal issue ID for tracking purposes)
Hi. Did you add any feature to specify the assets path externally? Like in a properties file. So we don't need to extend LocalizationImpl
As per part of customer requirement. It was required to add some PNG, JSON and XML files at root path same as where favicon is created. This was not possible in current dxa code implementation even if we updated html-design to iclude images and other stuff at root level.
To achieve this we need to change in
LocalizationImpl.java
underdxa-common-impl
MethodisStaticContent
--> addp.contains(".png") || p.contains(".svg") || p.contains(".json") || p.contains(".xml")
, or any other format that you need to includeThis will allow us to configure different favicon based on device and OS.