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 Answer
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 %}