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   1158 Views

Avatar
Dr0gaz

26 January 2011 at 12:30am Community Member, 37 Posts

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

26 January 2011 at 1:14am Forum Moderator, 1796 Posts

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

26 January 2011 at 1:58am (Last edited: 26 January 2011 1:58am), Community Member, 37 Posts

if works this

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