Skip to content

Instantly share code, notes, and snippets.



Last active Nov 5, 2016
What would you like to do?
MODX: Snippet to get the ID of the grandparent resource (see:
$id = $modx->resource->get('id');
$parents = $modx->getParentIds($id, 2);
$grandparent = $parents[1];
return $grandparent;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.