I am trying to print the value of a variable passed to a branch template. I am using this code:
{{ naziv[0] }} The index is 0 because the passed array has only one element. The mentioned code causes the following error:
Key "0" for an array with keys "title" does not exist in ...
but when i use for loop like this:
{% for key,value in naziv %} {{ value }} {% endfor %}
I get what I want.
What happened to {{naziv[0]}} ?
source share