Here's my setup:
Twig Version: 1.34.4
ACF Pro 5.8.8
I have the following ACF fields created, and I am trying to translate a working web page from standard PHP over to Twig.
ACF Field Group > Group > Repeater > Post Object
At the repeater level, I can access other standard fields fine, and I'm displaying these without a problem on the Twig template. My problem is how I access inside the Post Object so I can pull out the standard WP fields Title, Content etc.
I'm referencing the ACF cookbook at https://timber.github.io/docs/guides/acf-cookbook/, and thought the Relationship field might work, as such:
{% for item in Post(post.relationship_field) %}
{{ item.title }}
{# Do something with item #}
{% endfor %}
However this doesn't output anything at all so I'm not sure it's working.
In my PHP page, I'm only passing in the standard post context like so:
$context['post'] = $post;
Do I have to add anything else to the PHP page in order to make this work, or should I be able to do this natively in the Twig template?
{{ dump(post) }}
and see anything? – Chris Haas