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)


10 Posts   2100 Views


3 March 2011 at 11:56pm Community Member, 37 Posts

why this don't work?

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

      //echo $dos->TotalPages();

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


4 March 2011 at 1:32am Forum Moderator, 1796 Posts

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.