I'd like to build a Structure that can be used to output the main site navigation; each "entry" in the Structure would have three custom fields (types): Category, Entries, URL
This question is close to what I want, except it's not using Nav; I want children, so I think I need Nav? Plus I couldn't get that code to work anyway.
Based on other questions and the docs, I have this:
{% set pages = craft.entries.section('navDropDownMenu').all() %}
<ul>
{% nav page in pages %}
<li>
{% if page.entriesFieldLink %}
<a href="{{ page.entriesFieldLink.first().url|default }}">{{ page.title }}</a>
{% elseif page.urlFieldLink %}
<a href="{{{{ page.urlFieldLink.first().url|default }}">{{ page.title }}</a>
{% else %}
<a href="{{ page.category.url }}">{{ page.title }}</a>
{% endif %}
{% ifchildren %}
<ul>
{% children %}
</ul>
{% endifchildren %}
</li>
{% endnav %}
</ul>
The only thing that works here is the Category link, except it should be a child but it isn't. I'm new to Craft so I'm probably doing something basic wrong, but any help is appreciated.