Use a Wayfinder call like this:
[[!Wayfinder?
&startId=`99`
&level=`1`
&limit=`5`
&rowTpl=`adhocRowTpl`
]]Here you have to replace 99 by the Id of the container of your portfolio items.
With
&level=`1` you restrict the output to the top level, and so the
&limit =`5` will display 5 items of this top level - but so far without their children, of course.
To show the children too, you need the explicit
&rowTpl parameter, wherein the placeholder
is replaced by a second Wayfinder call having the actual Id as
&startId:
[[Wayfinder? &startId=`[[+id]]`]]
E.g. the chunk
adhocRowTpl could be:
<li[[+wf.classes]]><a href="[[+wf.link]]" title="[[+wf.title]]" [[+wf.attributes]]>[[+wf.linktext]]</a>[[Wayfinder? &startId=`[[+id]]`]]</li>
That should do it.
[ed. note: ottogal last edited this post 15 years ago.]