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

Templates in AMP4EMAIL are more constrained. You can have a dynamic href but the entire attribute value must be replaced: #38641

Open
dkjonzy2 opened this issue Jan 20, 2023 · 0 comments

Comments

@dkjonzy2
Copy link

Is this still supported? I am trying to dynamically set the URL using amp-bind based on form input values but the AMP validator gives the error message: The relative URL '{{myState.url}}' for attribute 'href' in tag 'a' is disallowed.

Templates in AMP4EMAIL are more constrained. You can have a dynamic href but the entire attribute value must be replaced:

<amp-list ...>
  <template ...>
    <a href="https://example.com/{{id}}"></a>  <!-- not supported -->
    <a href="{{url}}"></a>  <!-- supported -->
  </template>
</amp-list>

Hope that helps!

Originally posted by @dreamofabear in #19741 (comment)

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

No branches or pull requests

2 participants