• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
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.


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2020 MyBB Group.