ampproject / wg-amp4email

Responsible for the AMP4Email project. Facilitator: @nainar
Creative Commons Attribution 4.0 International
56 stars 14 forks source link

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

Closed dkjonzy2 closed 9 months ago

dkjonzy2 commented 1 year ago

I am trying to dynamically change the href URL based on inputs using amp-bind. This post says that you can set href using double curly braces but it is not passing the validator.

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 https://github.com/ampproject/amphtml/issues/19741#issuecomment-445994469