Welcome Guest, Not a member yet? Register   Sign In
Datamapper nestedsets and pagination
#1

[eluser]kev[/eluser]
Hi,

I'm using the dump_tree method of nestedsets to return all the tree I have, is there anyway to paginate the results? I haven't see any example about this.

I'm using this to get the trees

Code:
$root
  ->select_root($root->root_id)
  ->get_root()
  ->dump_tree( NULL , 'array' , FALSE );

Can someone help please?
#2

[eluser]WanWizard[/eluser]
No. As the name implies, dump_tree() dumps the entire tree.

You'll have to array_slice() in your controller if you only want to use parts of the result.




Theme © iAndrew 2016 - Forum software by © MyBB