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

Paginate


Reply


3 Posts   1229 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, 1808 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?