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

Steffen Müller typo3 at t3node.com
Tue Mar 29 15:02:31 CEST 2011


Hi Stefan,

On 28.03.2011 22:45 Stefan Galinski wrote:
>
> GetNodes:
> The getNodes method just maps the database results inside a simple object
> model by what you can access and use the tree structure in a object-oriented
> way. You want to collect the id's in a flat array instead of a tree.
> Unfortunately there isn't a method to transform the tree structure into a
> flat array, so you need to write it yourself.
>

Thanks for your explanations.

It worked, after I explicitly set a fallback nodeLimit, since 
$GLOBALS['BE']['pageTree']['preloadLimit'] is not set by default.

$node = t3lib_div::makeInstance('t3lib_tree_pagetree_Node', (array) 
$nodeData);
$nodeLimit = ($GLOBALS['BE']['pageTree']['preloadLimit']) ? 
$GLOBALS['BE']['pageTree']['preloadLimit'] : 999;
$dataProvider = 
t3lib_div::makeInstance('t3lib_tree_pagetree_DataProvider', $nodeLimit);

The new pagetree implementation looks really good. Thanks for your work 
on it!

-- 
cheers,
Steffen

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





More information about the TYPO3-dev mailing list