How to add a link at each page aumatically? | Community
Skip to main content
October 16, 2015
Solved

How to add a link at each page aumatically?

  • October 16, 2015
  • 2 replies
  • 683 views

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

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by smacdonald2008

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 replies

WhoaShekhar
Level 10
October 16, 2015

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!

smacdonald2008
smacdonald2008Accepted solution
Level 10
October 16, 2015

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]