More in this section
Forums / Bugs & Issues / Issues with custom ContentViewItemList

Issues with custom ContentViewItemList

The forums are in read-only mode. In case that you want to directly contact the Progress Sitefinity team use the support center. In our Google Plus group you can find more than one thousand Sitefinity developers discussing different topics. For the Stack Overflow threads don’t forget to use the “Sitefinity” tag.
2 posts, 0 answered
  1. Isabelle
    Isabelle avatar
    11 posts
    Registered:
    08 Jun 2010
    14 Apr 2011
    Link to this post
    I am having issues with a custom version of the ContentViewItemList. I created the custom version because I wanted it to be an ol rather than a ul, so that the blog posts could be numbered. I also want to only have "Previous" and "Next" and not all the page numbers. I deleted most of the content which I didn't want (I only want the titles). But when I click on "Previous" or "Next"  it displays the same content from the first page. I know there is something wrong with how I customized the template, but I don't know what it is. Alternatively, is there any way to more easily make it a ol rather than ul and eliminate the page numbers?

    Below is the template:
    <%@ Control Language="C#" %>
    <%@ Register Assembly="Telerik.Blogs" Namespace="Telerik.Blogs.WebControls" TagPrefix="sfWeb" %>

    <telerik:CssFileLink ID="CssFileLink1" EmbeddedFileName="Telerik.Blogs.Resources.ControlTemplates.Frontend.blogsCommonLayout.css" FileName="" Media="screen" runat="server" />

    <sfWeb:HeaderLinks id="headerLinks" runat="server" />

    <asp:HyperLink ID="backLink" runat="server" Text="Go Back" />
    <asp:Repeater ID="repeater" runat="server">
     <HeaderTemplate>
            <ol class="sf_postListing">
        </HeaderTemplate>
        <ItemTemplate>
            <li>
                <h3 class="sf_postTitle">
                    <asp:HyperLink ID="fullContent1" runat="server">
                        <asp:Literal ID="Title" runat="server"></asp:Literal>
                    </asp:HyperLink>
                </h3>
            </li>
        </ItemTemplate>
        <FooterTemplate>
            </ul>
        </FooterTemplate>
    </asp:Repeater>
    <telerik:Pager ID="pager1" runat="server">
        <LayoutTemplate>
             <asp:Repeater ID="PageRepeaterLinkButton" runat="server">
                <HeaderTemplate>
                    <ol class="sf_pager">
                    <li><asp:LinkButton ID="PreviousPage" runat="server" Text="&laquo; Previous"></asp:LinkButton></li>
                </HeaderTemplate>
                <FooterTemplate>
                    <li><asp:LinkButton ID="NextPage" runat="server" Text="Next &raquo;"></asp:LinkButton></li>
                    </ol>
                </FooterTemplate>
            </asp:Repeater>
            <asp:Repeater ID="PageRepeaterHyperLink" runat="server">
                <HeaderTemplate>
                    <ol class="sf_pager">
                    <li><asp:HyperLink ID="PreviousPage" runat="server" Text="&laquo; Previous"></asp:HyperLink></li>
                </HeaderTemplate>
                <FooterTemplate>
                    <li><asp:HyperLink ID="NextPage" runat="server" Text="Next &raquo;"></asp:HyperLink></li>
                    </ol>
                </FooterTemplate>
            </asp:Repeater>
           
        </LayoutTemplate>
    </telerik:Pager>


    Thanks,
    Isabelle
  2. Radoslav Georgiev
    Radoslav Georgiev avatar
    3370 posts
    Registered:
    01 Feb 2016
    20 Apr 2011
    Link to this post
    Hi Isabelle,

    I have tried with this markup and all seems fine:
    <%@ Control Language="C#" %>
    <%@ Register Assembly="Telerik.Blogs" Namespace="Telerik.Blogs.WebControls" TagPrefix="sfWeb" %>
    <telerik:CssFileLink ID="CssFileLink1" EmbeddedFileName="Telerik.Blogs.Resources.ControlTemplates.Frontend.blogsCommonLayout.css" FileName="" Media="screen" runat="server" />
    <sfWeb:HeaderLinks id="headerLinks" runat="server" />
    <asp:HyperLink ID="backLink" runat="server" Text="<%$Resources:GoBack %>" />
    <asp:Repeater ID="repeater" runat="server">
     <HeaderTemplate>
            <ol class="sf_postListing">
        </HeaderTemplate>
        <ItemTemplate>
            <li>
                <h2 class="sf_postTitle">
                    <asp:HyperLink ID="fullContent1" runat="server">
                        <asp:Literal ID="Title" runat="server"></asp:Literal>
                    </asp:HyperLink>
                </h2>
            </li>
        </ItemTemplate>
        <FooterTemplate>
            </ol>
        </FooterTemplate>
    </asp:Repeater>
    <telerik:Pager ID="pager1" runat="server">
        <LayoutTemplate>
             <asp:Repeater ID="PageRepeaterLinkButton" runat="server">
                <HeaderTemplate>
                    <ol class="sf_pager">
                    <li><asp:LinkButton ID="PreviousPage" runat="server" Text="<%$Resources:PreviousPage %>"></asp:LinkButton></li>
                </HeaderTemplate>
                <ItemTemplate>
                    <li>
                        <asp:LinkButton ID="SingleItem" runat="server" />
                    </li>
                </ItemTemplate>
                <FooterTemplate>
                    <li><asp:LinkButton ID="NextPage" runat="server" Text="<%$Resources:NextPage %>"></asp:LinkButton></li>
                    </ol>
                </FooterTemplate>
            </asp:Repeater>
            <asp:Repeater ID="PageRepeaterHyperLink" runat="server">
                <HeaderTemplate>
                    <ol class="sf_pager">
                    <li><asp:HyperLink ID="PreviousPage" runat="server" Text="<%$Resources:PreviousPage %>"></asp:HyperLink></li>
                </HeaderTemplate>
                <ItemTemplate>
                    <li>
                        <asp:HyperLink ID="SingleItem" runat="server" />
                    </li>
                </ItemTemplate>
                <FooterTemplate>
                    <li><asp:HyperLink ID="NextPage" runat="server" Text="<%$Resources:NextPage %>"></asp:HyperLink></li>
                    </ol>
                </FooterTemplate>
            </asp:Repeater>
            
        </LayoutTemplate>
    </telerik:Pager>


    Regards,
    Radoslav Georgiev
    the Telerik team

2 posts, 0 answered