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.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

General Questions /

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

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

Dispalay pages...(paging)


Go to End


10 Posts   3061 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, 1899 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