AMP image template

Simple question: I have 3 templates:

  1. _default/baseof.html
  2. _default/baseof.amp.html
  3. partials/image.html

How can I send a variable to the “partials/image.html” from the first 2 to be possible to have:

{{ if eq "site" "namp" }}
 <img src="...">
{{ else if eq "site" "amp" }}
 <img src="...">
{{ end }}

without having 2 templates for image?

You can pass a dict to a partial:

1 Like