Rather than trying to append the index of the for loop within the square braces, I would seperate them out first by assigning an index variable by itself, then using that variable within your square braces.
{% for i in (1..5) %}
{%- assign image_key = “image_” | append: i -%}
{%- assign image_position_key = “image_position_” | append: i -%}
{%- assign content_key = “content_” | append: i -%}
{%- assign image = block.settings[image_key] -%}
{%- assign image_position = block.settings[image_position_key] -%}
{%- assign content = block.settings[content_key] -%}
{%- if image != blank -%}
{%- endif -%}
{% endfor %}
It looks like a syntax error and you’re trying to assign the key within the square braces which isn’t allowed in Liquid.
Hope this helps. If it works, please accept the solution ![]()