Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ru2fac/be486831776b2911b353314543dbc5b9 to your computer and use it in GitHub Desktop.
Save ru2fac/be486831776b2911b353314543dbc5b9 to your computer and use it in GitHub Desktop.
[[pdoResources?
&parents=`0`
&select=`{
"modResource":"id, pagetitle",
"Children":"COUNT(Children.id) as count"
}`
&leftJoin=`{
"Children":{"class":"modResource", "on":"modResource.id = Children.parent"}
}`
&sortby=`{"id":"ASC"}`
&where=`{"parent":0, "Children.id:IS NOT":null}`
&groupby=`modResource.id`
&limit=`0`
&tpl=`@INLINE <p>{$id}. {$pagetitle} - {$count} {$count | decl : "дочерний ресурс|дочерних ресурса|дочерних ресурсов"}</p>`
&showLog=`0`
]]
@ru2fac
Copy link
Author

ru2fac commented Nov 6, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment