Description
Pimcore version
11.5.0
Steps to reproduce
{% for i in pimcore_block('foo').iterator %}
{% for j in pimcore_block('bar').iterator %}
{% endfor %}
{{ dump(pimcore_block('foo').current) }}
{% endfor %}
{% pimcoreblock 'foo' %}
{% pimcoreblock 'bar' %}
{% endpimcoreblock %}
{{ dump(_block.current) }}
{% endpimcoreblock %}
Create two items for "foo" and three "bar" items for the first "foo".
Actual Behavior
The first block dumps:
0
1
The second block dumps:
-1
-1
Without the inner block ("bar") dump(_block.current)
has the correct values.
Expected Behavior
The _block
variable should be scoped to the block, so the inner block should not affect the _block
variable of the outer block.