Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[amp-story-shopping] Allow for a custom cta #38080

Closed
cpauwels opened this issue Apr 12, 2022 · 2 comments · Fixed by #38101
Closed

[amp-story-shopping] Allow for a custom cta #38080

cpauwels opened this issue Apr 12, 2022 · 2 comments · Fixed by #38101

Comments

@cpauwels
Copy link
Contributor

cpauwels commented Apr 12, 2022

Description

Similarly to the amp-story-attachment and amp-story-outlink, allow for passing an optional cta-text attribute so that it is possible to override the "Shop Now" text.

Please also update the following:

  • Documentation
  • amp validation so that cta-text is a valid attribute
@processprocess
Copy link
Contributor

Good idea :) I updated the description to include updating the documentation and validation.

@processprocess
Copy link
Contributor

This needs to follow the API for amp-story-page-attachment
Reference the docs here.

Steps to do this:

  1. Allow a new attribute on amp-story-shopping-attachment called cta-text.
  2. In buildcallback, if cta-text is defined, put it into the jsx template instead of the translated string.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants