I don’t think that Wayfinder can do this one out of the box with the standard methods. The problem is that there are two parentRowTpl states and wayfinder only supports one, we would need an innerParentRowTpl. There might be a way to do it using a TV or a document variable (the attributes is rarely used and may be a good option) to define the class (class="fly"). Or you could use a snippet to determine if it is a parent or not.
On the documents that would have the fly class you would fill in the attributes field with class="fly". Then on your template chunks you would be:
outerTpl:
<ul id="menu">
[+wp.wrapper+]
</ul>
rowTpl:
<li class="sub">[+wf.linktext+]
[+wp.wrapper+]
</li>
innerTpl:
<ul>
[+wf.wrapper+]
</ul>
innerRowTpl:
<li[+wf.attributes+]><a href="[+wf.link+]">[+wf.linktext+]</a>
[+wp.wrapper+]
</li>
-------------------
A cleaner way may be to build a simple snippet to check to see if it is a parent and then include the proper class.
Snippet isParent to check if the current document has children or not:
<?php
$id = isset( $id )? $id: $modx->documentIdentifier;
$child = $modx->getChildIds($id);
if(count($child)){
return 'class="fly"';
}
?>
Then add the snippet call in the innerRowTpl chunk like this:
<li[!isParent!]><a href="[+wf.link+]">[+wf.linktext+]</a>
[+wp.wrapper+]
</li>
Note that embeded snippet calls need alternating cache settings, if the outer snippet is uncached [! !] then the inner one must be cached [[ ]] or the other way around.
This is all untested.