Skip to content

Instantly share code, notes, and snippets.

@OlegShchavelev
Created June 9, 2017 13:58
Show Gist options
  • Save OlegShchavelev/4b352bbcfcad2588196d7649ea65c233 to your computer and use it in GitHub Desktop.
Save OlegShchavelev/4b352bbcfcad2588196d7649ea65c233 to your computer and use it in GitHub Desktop.
Считаем дочерние ресурсы
<?php
$pars = array(
'parents' => $parents,
'depth' => $depth,
'totalVar' => 'count',
'where' => $where
);
$modx -> runSnippet('pdoResources', $pars);
return '[[+count]]';
{'!count' | snippet: [
'parents' => $id,
]}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment