Portal Engine Questions on portal engine and web parts.
Version 5.x > Portal Engine > Is there an easy way to add paging to a Message Board? View modes: 
User avatar
Certified Developer v7
Certified  Developer v7
John Bubriski - 12/8/2010 12:59:59 PM
   
Is there an easy way to add paging to a Message Board?
Is there an easy way to add paging to a Message Board? Our client has lengthy message boards, and would like to page the messages to make the pages smaller/load faster. Thanks,

John Bubriski

User avatar
Kentico Developer
Kentico Developer
kentico_ivanat - 12/8/2010 1:17:55 PM
   
RE:Is there an easy way to add paging to a Message Board?
Hi,

Unfortunately, pagination within message boards is not supported by default, however you can still add the 'UniPager' control to '~\CMSModules\MessageBoards\Controls\MessageBoard.ascx' file and link it to <cms:QueryRepeater ID="rptBoardMessages" /> control, in this way you should be able to use paging. Please see following example code for unipager control:
<cms:UniPager ID="up1" PagerMode="PostBack" PageControl="rptBoardMessages" PageSize="2" runat="server">
<pagenumberstemplate>
<a href="<%# Eval("PageUrl") %>"> <%# Eval("page") %> </a>
</pagenumberstemplate>
</cms:UniPager>

Please note that you can add additional pager templates according your needs.

P.S. Following knowledge base article could be useful for you: Ajax functionality for UniPager connected with Repeater

Best regards,
Ivana Tomanickova