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

Paginate


Go to End


3 Posts   1574 Views

Avatar
Dr0gaz

Community Member, 37 Posts

26 January 2011 at 12:30am

Hi guys i want paginte records in my db... but i want first charge pages for html... example

Page1
<div class="item">
<ul>
<% control getObjects %>
<li>$pergunta</li>
<% end_control %>
</ul>
</div>

Page2
<div class="item">
<ul>
<% control getObjects %>
<li>$pergunta</li>
<% end_control %>
</ul>
</div>

Page3
<div class="item">
<ul>
<% control getObjects %>
<li>$pergunta</li>
<% end_control %>
</ul>
</div>

Avatar
swaiba

Forum Moderator, 1899 Posts

26 January 2011 at 1:14am

http://doc.silverstripe.org/sapphire/en/reference/dataobjectset#paging encouragly says FIXME
and this has not been migrated http://doc.silverstripe.org/private:recipes:pagination

but you could always checkout how templates\Layout\Page_results.ss as this shows parsing a DataObjectSet (Results) to create pagination

Avatar
Dr0gaz

Community Member, 37 Posts

26 January 2011 at 1:58am

Edited: 26/01/2011 1:58am

if works this

<% control getObjects.Pages %>
<div class="item">
<ul>
<% control getObjects %>
<li>$pergunta</li>
<% end_control %>
</ul>
</div>
<% end_control>
why dont work?