API docs     >     Pages and Sites     >     PageMgr

PageMgr->getTree

Description

getTree ( $pageId = NULL, $maxLevels = 2, $resolveCblocks = false, $noTrash = true )
Get Pages tree nodes

Parameters

$pageId
int
(optional) From which Page Id the tree should be returned
$maxLevels
int
(optional) Specifies the maximum level of nodes to get
$resolveCblocks
bool
(optional) TRUE when the contained Cblocks should also be returned
$noTrash
bool
(optional) FALSE when item from the Trash should also be returned

Returns

array
Array of Page nodes
  1. Array(                              array Array of n Pages
  2.     [0] => Array(
  3.         [ID] => 1                   int Id
  4.         [LFT] => 1                  int Id of the left node in the nested set tree structure
  5.         [RGT] => 6                  int Id of the right node in the nested set tree structure
  6.         [VERSIONPUBLISHED] => 0     int Published version (either a specific version or 999999 if set to 'ALWAYS_LATEST_APPROVED_VERSION')
  7.         [TITLE] => ''               string Title
  8.         [LEVEL] => 1                int Level in tree
  9.         [PARENT] => 0               int Parent Id
  10.         [PNAME] => 'Homepage'       string Permanent name
  11.         [VERSION] => 0              int Version
  12.         [HASCHANGED] => 0           int 1 if changed since last approval, 0 if not
  13.         [NAME] => 'Homepage'        string Name
  14.         [ACTIVE] => 1               int 1 if active, 0 if inactive
  15.         [NAVIGATIONID] => 0         int Navigation Id
  16.         [TEMPLATEID] => 1           int 1 if changed since last approval, 0 if not
  17.         [RREAD] => 1                int 1 if User owns Permissions to read this Object, 0 if not
  18.         [RWRITE] => 1               int 1 if User owns Permissions to write this Object, 0 if not
  19.         [RDELETE] => 1              int 1 if User owns Permissions to delete this Object, 0 if not
  20.         [RSUB] => 1                 int 1 if User owns Permissions to create subnodes under this Object, 0 if not
  21.         [RSTAGE] => 1               int 1 if User owns Permissions to publish/approve this Object, 0 if not
  22.         [RMODERATE] => 1            int 1 if User owns Permissions to moderate Comments of this Object, 0 if not
  23.         [RCOMMENT] => 1             int 1 if User owns Permissions to add Comments to this Object, 0 if not
  24.     )
  25.     ...
  26. )