G

getChildCount

By inogda (inogda)


<p style="margin: 10px 0px 20px; padding: 0px; border: 0px; outline: 0px; font-size: 16px; vertical-align: baseline; background: rgb(255, 255, 255); line-height: 1.5; color: rgb(68, 68, 68); font-family: proxima-nova, proxima-nova-1, "Helvetica Neue", helvetica, arial, sans-serif;">Initial release.

Installation Instructions<p style="margin: 10px 0px 20px; padding: 0px; border: 0px; outline: 0px; font-size: 16px; vertical-align: baseline; background: rgb(255, 255, 255); line-height: 1.5; color: rgb(68, 68, 68); font-family: proxima-nova, proxima-nova-1, "Helvetica Neue", helvetica, arial, sans-serif;">Install using Package Manager.

<p style="margin: 10px 0px 20px; padding: 0px; border: 0px; outline: 0px; font-size: 16px; vertical-align: baseline; background: rgb(255, 255, 255); line-height: 1.5; color: rgb(68, 68, 68); font-family: proxima-nova, proxima-nova-1, "Helvetica Neue", helvetica, arial, sans-serif;">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.&nbsp;&depth= - (default =0),&deleted=- (default =false),&published= - (default =true),

<p style="margin: 10px 0px 20px; padding: 0px; border: 0px; outline: 0px; font-size: 16px; vertical-align: baseline; background: rgb(255, 255, 255); line-height: 1.5; color: rgb(68, 68, 68); font-family: proxima-nova, proxima-nova-1, "Helvetica Neue", helvetica, arial, sans-serif;">Examples:

<p style="margin: 10px 0px 20px; padding: 0px; border: 0px; outline: 0px; font-size: 16px; vertical-align: baseline; background: rgb(255, 255, 255); line-height: 1.5; color: rgb(68, 68, 68); font-family: proxima-nova, proxima-nova-1, "Helvetica Neue", helvetica, arial, sans-serif;">[[!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.

inogda


New in getChildCount 1.0.0

There are no release notes for this version.

More

Information

Released
April 17, 2018
Supported Versions
2 – 2.6
Downloads
197
License
GPLv2