Show menu child item title

I’m using this template to display a menu:

<ul>
  <Loop type="menu" menu="Primary Menu">
    <li><a href="{Field url}"><Field title /></a></li>
    <If field=children>
      <ul>
        <li><Field children /></li>
      </ul>
    </If>
  </Loop>
</ul>

How do I display the title of a child item? At the moment this only shows the ID.

Nevermind, read the documentation and figured it out:

<ul>
  <Loop type="menu" menu="Primary Menu">
    <li><a href="{Field url}"><Field title /></a></li>
    <If field=children>
      <Loop field="children">
        <ul>
          <li><Field title /></li>
        </ul>
      </Loop>
    </If>
  </Loop>
</ul>
2 Likes