• MODX.com

    488 downloads

getChildCount

getChildCount is an extra by inogda, first released on 2018-04-16.

Package Description

Initial release.

Installation Instructions

Install using Package Manager.

To use:

[!getChildCount? 

    &parent=`id - list of parents` 

    &depth=`Search depth of child resources from parent in the Resource Tree` 

    &template=`template to filter results` 

    &*=`you can select all fields 'site_content' to filter the result` 

    &toPlaceholder=`If not empty, the snippet will save its output to a placeholder with the same name, instead of returning the generated menu.`]]

When the page loads, start search is performed for:&parent=`` - (default current page),&parent=`3` - child resources for &parent. &depth=`` - (default =0),&deleted=`` - (default =false),&published=`` - (default =true),

Examples:

[[!getChildCount? &parent=`33` &depth=`0` &template=`3` &class_key=`msCategory`]] — Return the number children of a given resource = 33, with a given tree-depth = 1, wich a filter template=`3` and class_key=`msCategory`.

[[!getChildCount? &parent=`33` &depth=`0` &template=`3` &class_key=`msCategory` &toPlaceholder=`countres`]] — Save output to a placeholder with this name [[+countres]] instead of displaying the output to the screen.

Usage/Installation Instructions

Initial content

Details

Developer(s)
inogda
Released
2018-04-17
First seen
2018-04-16
License
GPLv2
Supported databases
MySQL
Minimum MODX Requirement
2

getChildCount Releases

Vendor Signature Released on
MODX.com 1.0.0-pl 2018-04-17 (6 years ago)