Closed jakob-kruse closed 3 years ago
I don't know too much about this kind of handlebars syntax either, but you could try using ()
for indirection, maybe something like {{(prop)}}
... If that doesn't work you can try asking in handlebars-rs repo (i'd link it but I'm on mobile)
Environment
Arch Linux Dotter 0.12.1
The question
For example, I have the following section in my
.dotter/global.toml
Now in the template file I want to iterate over
foo.list
:In that loop i want to get the variable inside foo. For example,
foo[myProp]
(when myProp is "bar") should render "hello".I thought about using lookup for that, but I can't get it to work.
I tried doing (inside the loop)
But that just renders nothing.
The following does work as intended, but the prop cant be dynamic
I know this is very specific, I'm sorry. Thanks