Last active
January 3, 2019 00:23
-
-
Save BlackhawkG7/56d2105f88ed88d61d32e2bc95700b63 to your computer and use it in GitHub Desktop.
Get the root page in current page tree | TYPO3 // extbase
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)); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment