getParent
Last edited by JP DeVries on Aug 9, 2013.
function getParent($id=-1, $active=1, $fields='id, pagetitle, description, alias, parent');
API Function Definition
Access | Private |
Available since | Unknown |
Returns | Array |
Usage / 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.
Related Function
Suggest an edit to this page on GitHub (Requires GitHub account. Opens a new window/tab).