Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

General Questions /

General questions about getting started with SilverStripe that don't fit in any of the categories above.

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba, simon_w

Dispalay pages...(paging)


Go to End
Reply


10 Posts   2142 Views

Avatar
Dr0gaz

Community Member, 37 Posts

3 March 2011 at 11:56pm

why this don't work?

function getResults() {
      
      $iPageLength = 5;
      
      $dos = DataObject::get('Problema');

      $dos->setPageLength($iPageLength);
      
      //echo $dos->TotalPages();
      $i=5;
      
      $dos->getRange($i*$iPageLength,$iPageLength);
}

this code place in dataobjectmanager... i need a controler? in my dataobjectmanager?

Avatar
swaiba

Forum Moderator, 1799 Posts

4 March 2011 at 1:32am

XXXXPage_Controller - the controller of the page you want this on or in Page_Controller if you want this "control" available on all pages.

this is based on a guess because "this don't work" is not a very helpful description of the result of using this as a function - you need to detail where the code is placed, template code calling it and if there is no output (as I assume from this) then say that.

Go to Top