This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Get the root page in current page tree | |
$pid = intVal($_GET['id']); | |
$page = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Frontend\\Page\\PageRepository'); | |
$root = array_pop($page->getRootLine($pid)); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// get 10 levels of the tree recursively starting at $pid | |
$pid = intVal($_GET['id']); | |
$queryGenerator = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\Database\\QueryGenerator'); | |
$pidList = $queryGenerator->getTreeList($pid, 10, 0, 1); | |
$pids = explode(',',$pidList); |
NewerOlder