Paging in Newslist.....


Hi, i have implemented paging in Newslist control (using Episerver CMS 5 R2). In addition to the newslist control, am having an XHTML text in the same aspx page, which should be displayed only in the first page of Newslist control.  When i move to others pages of the Newslist this XHTML text should not be displayed. How could i do this.....




Nov 18, 2008 15:02

Hi Nishath.

Do you mean that you don`t want to show the XHTML property when you change the paging index in the paging control? What about having an asp:placeholder around the XHTML text and only showing it if the CurrentPagingItemIndex is 0? Haven`t tried it out though....



Nov 18, 2008 15:12
Yes, i tried the same by checking CurrentPagingItemIndex, also then its getting displayed...
Nov 19, 2008 5:14

Hi Nishath.

How are you doing it? Tried it out this morning and it worked fine.

Here is my aspx:

<EPiServer:NewsList runat="server" Paging="true" PageLinkProperty="NewsRoot" ID="plNewsList" PagesPerPagingItem="2">
     <h1><%#plNewsList.PagingControl.CurrentPagingItemIndex %></h1>
     <EPiServer:Property runat="server" PropertyName="PageLink" />
     <br />
<asp:PlaceHolder runat="server" Visible="false" ID="plhBody">
     <Episerver:Property runat="server" PropertyName="MainBody" />

Here is my codebehind:

 protected override void OnPreRender(System.EventArgs e)

    plhBody.Visible = plNewsList.PagingControl.CurrentPagingItemIndex == 0;

Hope this helps!

BR, Tore

Nov 19, 2008 8:34



Thank you very much Tore...

Nov 19, 2008 10:16
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.