I have checked the documentation and various posts and could not find examples of this. What I want is to access a field of a group, which is within a repeater in ACF Pro, using Timber/Twig.
What I have is:
{% for item in post.meta('main_field') %}
{{ item.normal_field }} // outputs fine
{% for group_name in item.main_field %}
{{ group_name.group_field }} // outputs nothing
{% endfor %}
{% for group_name in item %}
{{ group_name.group_field }} // outputs only the first instance
{% endfor %}
{% endfor %}
If I put {{ item.group_name.group_field }}
I get only the data from the first item output.
I have also tried adding {% set group = post.meta('group_name') %}
both before and after {% for item in post.meta('main_field') %}
which outputs nothing, when referenced by {{ group.group_field }}
.
So how do you reference a group within a repeater?