Jump to:

23484 Posts in 18977 Topics by 2878 members

General Questions

SilverStripe Forums » General Questions » Dispalay pages...(paging)

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

Page: 1 2
Go to End
Author Topic: 2077 Views
  • Dr0gaz
    Avatar
    Community Member
    37 Posts

    Re: Dispalay pages...(paging) Link to this post

    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?

  • swaiba
    Avatar
    Forum Moderator
    1792 Posts

    Re: Dispalay pages...(paging) Link to this post

    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.

    2077 Views
Page: 1 2
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.