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

Adobe Summit 2023 [19th to 23rd March, Las Vegas and Virtual] | Complete AEM Session & Lab list
SOLVED

Mobile and Desktop view

Avatar

Level 2

Hello AEM community,

 

I'm new to AEM and I want to know if there is a way to identify if the current view is on mobile or desktop on code level(methods or properties on AEM that I can use to identify) without using the viewport. I'm creating Image component that the author can use 2 images for desktop and mobile option. Thank you ! 

 

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

Hi @AEMStarterNewbie 

 

If you are wanting to do it in CSS code, used media-queries. You should not check it in the backend due to caching issues.

 

Similar post: https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager/aem-6-3-to-detect-from-des...

 

Thanks,

Kiran Vedantam.

View solution in original post

1 Reply

Avatar

Community Advisor

Hi @AEMStarterNewbie 

 

You can use the small devices icon on top of every page on edit mode to move from desktop to devices

 

Kiran_Vedantam_0-1637571370062.png

Hope this helps.

Thanks,

Kiran Vedantam.

Avatar

Level 2

Thank you for that. What I mean is on code level. Is there method or properties that I can use in AEM ? 

Avatar

Correct answer by
Community Advisor

Hi @AEMStarterNewbie 

 

If you are wanting to do it in CSS code, used media-queries. You should not check it in the backend due to caching issues.

 

Similar post: https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager/aem-6-3-to-detect-from-des...

 

Thanks,

Kiran Vedantam.

The ultimate experience is back.

Join us in Vegas to build skills, learn from the world's top brands, and be inspired.

Register Now