내 커뮤니티 업적 표시줄을 확대합니다.

Submissions are now open for the 2026 Adobe Experience Maker Awards.

Mark Solution

활동이 없어 이 대화는 잠겼습니다. 새 게시물을 작성해 주세요.

해결됨

How to add a link at each page aumatically?

Avatar

이전 커뮤니티 멤버

Hi there,

Maybe there is a challenge case for me: i want to add a button or link "Add to Cart" at the top right corner for each page automatically, please see following screenshot:

[img]add2cart.png[/img]

 

It means that if user to open a instance of pagee/template, the button/link appear at there automatically. But i don't know how to write a script for that in AEM since i am new to that? Anyone could help see and give your comment here?

Thanks a lot.

 

Best regards,

Brian

1 채택된 해결책 개

Avatar

정확한 답변 작성자:
Level 10

You add  AEM component to the page(s) during design time (including the cart component). Components are not added to AEM pages during run-time. In this case - you would add the component at design time. 

See the geometrixx-outdoors sample app for an example of the cart component:

http://localhost:4502/editor.html/content/geometrixx-outdoors/en/men/coats.html

[img]Cart.png[/img]

원본 게시물의 솔루션 보기

2 답변 개

Avatar

Level 10

Hi there,

Thank you for reaching out to Adobe Community.

Please go through the below link and see if it helps: We have the add to cart component under the commerce section.

https://docs.adobe.com/docs/en/aem/6-0/author/page-authoring/default-components/components.html

Thanks!

Avatar

정확한 답변 작성자:
Level 10

You add  AEM component to the page(s) during design time (including the cart component). Components are not added to AEM pages during run-time. In this case - you would add the component at design time. 

See the geometrixx-outdoors sample app for an example of the cart component:

http://localhost:4502/editor.html/content/geometrixx-outdoors/en/men/coats.html

[img]Cart.png[/img]