1

I am looking to use a matrix field for my site navigation that has some dropdowns. Using a table field within a matrix field seems like it would work but I don't know how to access the table inside the matrix field in my template. Is this possible.

1

I figured it out. You can do it. Here is my example.

{% for block in mainNavigation.navigationLink %}
            <a class="navbar-item {{ block.className }}" href="{{ block.linkUrl }}">
                {{ block.linkName }}
            </a>

                {% if block.childLinks | length %}
                <div class="navbar-dropdown is-boxed">
                    {% for row in block.childLinks %}
                        <a class="navbar-item" href="">{{ row.childLinkName }}</a>
                     {% endfor %}
                </div>
                 {% endif %}


        {% endfor %}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.