I'm using nunjucks to render some variables:
<div class="zoomable zoomable-{{ slide.index }}"> << this works
{% if slide.temp is none %} << this doesn't
{% include "layouts/"+{{slide.layout}} %} << this doesn't
{% endif %}
</div>
When the JS calls nunjucks.render, I get the following error:
parseAggregate: expected colon after dict key on the include
There are two issues with this:
temp
doesn't exist.slide properties? Because
slide.layout is validAm I doing something wrong?
I think you just need to remove the curly brackets i.e.
{% include "layouts/" + slide.layout %}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With