[[Wayfinder?
&startId=`[[UltimateParent]]`
&rowTpl=`countTplRow`
&limit=`1`
&level=`1`
]][[Wayfinder?
&startId=`[[UltimateParent? &topLevel=`2`]]`
&hideSubMenus=`1`
&rowTpl=`countTplRow`
&limit=`1`
&level=`1`
]][[~[[*parent]]]]
$parent = $modx->resource->getOne('Parent');
return $modx->getChunk('countTplRow',$parent->toArray());[[Wayfinder?
&startId=`[[~[[*parent]]]]`
&rowTpl=`countTplRow`
&limit=`1`
&level=`1`
]]$parent = $modx->resource->getOne('Parent');
return $modx->getChunk('countTplRow',$parent->toArray());<a href="[[~[[*parent]]]]" title="[[+menutitle]]" class="overzicht"><span>Overzicht alle [[+menutitle]] / Aantal (<strong>[[getChildCount? &parent=`[[+id]]`]]</strong>)</span></a>
$count = 0;
$parent = isset($parent) ? (integer) $parent : 0;
if ($parent > 0) {
$criteria = array(
'parent' => $parent,
'deleted' => false,
'published' => true,
);
$count = $modx->getCount('modResource', $criteria);
}
return (string) $count;... you could use getResourceField ...For example in this way:
<a href="[[~[[!UltimateParent? &top=`2` &topLevel=`1`]]]]"> [[!getResourceField? &id=`[[!UltimateParent? &top=`2` &topLevel=`1`]]` &field=`pagetitle`]] </a>