getParent

Returns the parent record for the id passed.

Usage:

array getParent($id=-1, $active=1, $fields='id, pagetitle, description, alias, parent'); (show formatting legend)

Examples:

$parent = $modx->getParent(55,1,'pagetitle');

will return the title of the parent of document 55 if the parent is published.

$parent = $modx->getParent(55,0,'id');

will return the parent document's id if it is not published.