Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

Adding a meta tag in AEM 6.3 component

svijay2980
Level 2
Level 2

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

smacdonald2008 Arun Patidar

6 Replies
Arun_Patidar
Community Advisor
Community Advisor

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}"/>

svijay2980
Level 2
Level 2

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

Arun_Patidar
Community Advisor
Community Advisor

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

svijay2980
Level 2
Level 2

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

Arun_Patidar
Community Advisor
Community Advisor

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

rahulb31017943
Level 2
Level 2

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