Okay
  Public Ticket #3009335
Nested Repeater Doc
Closed

Comments

  • Keviin started the conversation

    Hey guys.
    I use groups and nested repeaters a lot.

    Can you please make some doc on that.

    Here's my latest issue:

    ACF hierarchy :
    Brewing (group) 
    - Methods (repeater)
    - - Amount (repeater)

    Field names:
    brewing (g)
    brewing_title

    - brewing_method
    - brewing_method_title

    - - brewing_amount
    - - brewing_amount_title
    - - brewing_amount_desc

    Code:
    I've tried below examples 

    Example 1
    <h3>{{current.post.cf_brewing_title}}</h3>
    {% for item in current_post.cf_brewing_method %}
        <p>{{item.brewing_method_title}}</p>

        {% for child in current_post.cf_brewing_amount %}
            <p>{{child.brewing_amount_title}}</p>
            <p>{{child.brewing_amount_desc}}</p>
        {% endfor %}
    {% endfor %}

    Example 2
    ...

        {% for child in item.current_post.cf_brewing_amount %}
    ...

    Example 3

    ...

        {% for child in current_post.item.cf_brewing_amount %}
    ...

    Example 4

    ...

        {% for child in item.cf_brewing_amount %}
    ...

  • Keviin replied

    It works 🙌

  •   Max replied privately