It does work as I have it on my site and it just counts the children and outputs a number.
I tried that but can’t get it to work :-{
Also I don’t want to output all the file names but only the name of the container and the number of files in it.
<?php
$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;
?>
Thanks for the replys!