Can the templates be used among JavaScript code between script tags?

For example, just like this works,

<div class="picture" style="background-image:url({{picture type=image tag=false}})">

would this work too?

<script>
  document.body.style.backgroundImage = "url({{picture type=image tag=false}})";
</script>

@user1234567 Yes, that will work. You can use Vapid tags anywhere in an HTML document (head, body, script, in an element attribute, etc.).

1 Like