[TYPO3-dev] 4.5 pagetree API to get page uids of all subpages of a page

Steffen Müller typo3 at t3node.com
Mon Mar 28 15:57:50 CEST 2011


On 28.03.2011 15:38 Steffen Müller wrote:
> What's missing here? How do I get childNodes? Does the pagetree API
> provide such function?
>

The classic one: I found the answer myself while asking for it. :)

$node = t3lib_div::makeInstance('t3lib_tree_pagetree_Node', (array) 
$nodeData);
$dataProvider = t3lib_div::makeInstance('t3lib_tree_pagetree_DataProvider');
$nodeCollection = $dataProvider->getNodes($node);
$pids = array();
foreach ($nodeCollection as $childNode) {
         $pids[] = $childNode->getId();
}

I hope this is the "official" way.

-- 
cheers,
Steffen

TYPO3 Blog: http://www.t3node.com/
Twitter: http://twitter.com/t3node





More information about the TYPO3-dev mailing list