Jump to main content Jump to doc navigation

modX::getTree

Get a site tree from a single or multiple modResource instances.

Syntax

API Doc: modX::getTree()

array getTree ([int|array $id = null], [int $depth = 10])

Example

Get a tree for the Resource with ID 12. Only go 5 levels deep.

$treeArray = $modx->getTree(12,5);

See Also