Is it possible to set variables in edge?


#1

Hi,

is there any way to set variables in the template file?

Simple ex:

{% set heroImg = 'https://cdn.my.com/image' %}

template

<div class="hero" style="background-image: url(heroImg)"></div>

Thx


#2
@set('heroImg', 'https://cdn.my.com/image')

#3

Thanks! You are very helpful, thx for your time!

You should put this in the edge documentation! :slight_smile: (or maybe im blind…)