Adding a meta tag in AEM 6.3 component

Avatar

Avatar

svijay2980

Avatar

svijay2980

svijay2980

22-11-2018

Is there any way we can add the meta viewport tag in a sightly AEM 6.3 component?

smacdonald2008 Arun Patidar

Accepted Solutions (0)

Answers (6)

Answers (6)

Avatar

Avatar

rahulb31017943

Avatar

rahulb31017943

rahulb31017943

07-09-2020

Have you got the solution, I am also facing the same issue in AEM 6.5.

Avatar

Avatar

Arun_Patidar

MVP

Total Posts

2.9K

Likes

1.0K

Correct Answer

831

Avatar

Arun_Patidar

MVP

Total Posts

2.9K

Likes

1.0K

Correct Answer

831
Arun_Patidar
MVP

22-11-2018

for testing I added in /apps/core/wcm/components/page/v1/page/head.html

Avatar

Avatar

svijay2980

Avatar

svijay2980

svijay2980

22-11-2018

Did you overlay the v1 component? Which file was this tag added in?

Avatar

Avatar

Arun_Patidar

MVP

Total Posts

2.9K

Likes

1.0K

Correct Answer

831

Avatar

Arun_Patidar

MVP

Total Posts

2.9K

Likes

1.0K

Correct Answer

831
Arun_Patidar
MVP

22-11-2018

I tested in aem 6.3 with core components v1, I am able to get the tag.

Screenshot 2018-11-23 at 12.55.07 PM.png

Avatar

Avatar

svijay2980

Avatar

svijay2980

svijay2980

22-11-2018

Even if I add that, viewport is getting changed to user-scalable=no. I'm using resourceSuperType as core/wcm/components/page/v2/page

Avatar

Avatar

Arun_Patidar

MVP

Total Posts

2.9K

Likes

1.0K

Correct Answer

831

Avatar

Arun_Patidar

MVP

Total Posts

2.9K

Likes

1.0K

Correct Answer

831
Arun_Patidar
MVP

22-11-2018

Hi,

Are you not able to add tag like below:

<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" data-sly-use.head="head.js">

<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">

<title>${pageProperties.pageTitle || currentPage.title}</title>

<meta name="keywords" content="${head.keywords}"/>

<meta name="description" content="${properties.jcr:description}"/>