<li> <a href="[[~[[+id]]]]">[[+menutitle:default=`[[+pagetitle]]`]]</a> [[getResources? &parents=`[[+id]]` &totalVar=`numChildren[[+id]]` &toPlaceholder=`children[[+id]]`]] [[+numChildren[[+id]]:gt=`0`:then=`<ul>[[+children[[+id]]]]</ul>`:else=``]] </li>
[[getResources? &parents=`0` &depth=`0` &limit=`3` &sortby=`menuindex` &sortdir=`ASC` &tpl=`Menu` ]]
This question has been answered by sottwell. See the first response.
Why are you using getResources for a menu? Wayfinder (or pdoMenu) is specifically intended for multi-level menus.