AEM 6.5.4. Adaptive and FavIcon

Avatar

Avatar
Validate 1
Level 3
Eric_Stricker
Level 3

Likes

12 likes

Total Posts

73 posts

Correct reply

2 solutions
Top badges earned
Validate 1
Ignite 5
Ignite 3
Ignite 1
Give Back 5
View profile

Avatar
Validate 1
Level 3
Eric_Stricker
Level 3

Likes

12 likes

Total Posts

73 posts

Correct reply

2 solutions
Top badges earned
Validate 1
Ignite 5
Ignite 3
Ignite 1
Give Back 5
View profile
Eric_Stricker
Level 3

12-05-2020

We followed "https://helpx.adobe.com/experience-manager/using/AEM63_favicon.html" to assign a favicon to each adaptive form.

 

1. The folder /etc/designs/ does not exists so we create this folder (sling:folder)

2. added a cq:page with our project name and added a favicon to this page as a child.

 

crx/de

Updated our adaptive form:

3. /content/forms/af/<project name>/<adaptive form name>/jcr:content

4. added node "cq:designPath" of type String with value "/etc/designs/<project name>"

 

Yeah.. FavIcon is now available

 

Issue is that we get an additional CSS file in the html <head> that does not exists and the browser console report this error.

 

Error:

Refused to apply style from 'https://<server>:<port>/etc/designs/<project name>.css' because its MIME type ('text/html') is not a supported stylesheet MIME type, and strict MIME checking is enabled.

 

Actual the browser is trying to load the file, but the server respond with a 404 as the file does not exists. (log file entry in "request.log")

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar
Springboard
Level 10
Mayank_Gandhi
Level 10

Likes

327 likes

Total Posts

1,150 posts

Correct reply

185 solutions
Top badges earned
Springboard
Establish
Validate 1
Contributor 2
Ignite 5
View profile

Avatar
Springboard
Level 10
Mayank_Gandhi
Level 10

Likes

327 likes

Total Posts

1,150 posts

Correct reply

185 solutions
Top badges earned
Springboard
Establish
Validate 1
Contributor 2
Ignite 5
View profile
Mayank_Gandhi
Level 10

12-05-2020

@Eric_Stricker The article seem specific to AEM but let me check internally if there is something additional we have to do here for forms. Allow me some time to check this. 

 

 

Answers (1)

Answers (1)

Avatar

Avatar
Validate 1
Level 3
Eric_Stricker
Level 3

Likes

12 likes

Total Posts

73 posts

Correct reply

2 solutions
Top badges earned
Validate 1
Ignite 5
Ignite 3
Ignite 1
Give Back 5
View profile

Avatar
Validate 1
Level 3
Eric_Stricker
Level 3

Likes

12 likes

Total Posts

73 posts

Correct reply

2 solutions
Top badges earned
Validate 1
Ignite 5
Ignite 3
Ignite 1
Give Back 5
View profile
Eric_Stricker
Level 3

13-05-2020

@Mayank_Gandhi

We found a solution, but not sure if this is according to the preferred methods

We notice that the "head.html" in libs is importing a file "customheaderlibs.html" for us to add values to the head tag

1. We created a new hidden component "apps.<project name>.components.pagefavicon" with
sling:resourceSuperType="fd/af/components/page2/aftemplatedpage"

2. In the component we added a file "pagefavicon.html" with 1 line of code:
<sly data-sly-include="aftemplatedpage.jsp"/>

Now we have created 1 level of indirection.
3. added a file "customheaderlibs.html" to the same component. In the file we added 2 lines of code:
<link rel="icon" type="image/vnd.microsoft.icon" href="/etc/designs/<project name>/favicon.ico">
<link rel="shortcut icon" type="image/vnd.microsoft.icon" href="/etc/designs/<project name>/favicon.ico">

4. Navigated to "/content/forms/af/<project name>/<adaptive form name>/jcr:content"

5. edited sling:resourceType with a new value "/apps/<project name>/components/pagefavicon"

6. Now the favicon is appearing.