+1-888-365-2779
Try Now
More in this section

Forums / Developing with Sitefinity / Blog post navigation

Blog post navigation

4 posts, 0 answered
  1. Anastasia Enkova
    Anastasia Enkova avatar
    2 posts
    Registered:
    03 May 2010
    27 Jan 2011
    Link to this post
    Hi there,

    I am using ContentViewItemList.ascx  to display list of posting and ContentViewSingleItem.ascx to display single post. How can I add  prev/ next post navigation links  into single post page (ContentViewSingleItem)?

    I also need to develop control to  display recent posts. Should I customize BlogViewItemList.ascx template or there is something else?

    Thank you,
    Ana.
  2. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    09 Dec 2016
    27 Jan 2011
    Link to this post
    Hi Anastasia,

    1. What is the idea behind having prev/ next post in the SinglePost. The architecture of ContentView expose two modes

    - List - all items
    -SingleItem - only one item is shown

    This request request to implement a custom control- slider or rotator where  you get the list of all items and switch them. You can easily implement this with RadRotator control which is populated with the same datasource. You should create a custom class that inherits from BlogPosts and bind the RadRotator inside CreateChildControls to CreateDataSource().

    2. You can use one of the GetContent overloads

    Regards,
    Ivan Dimitrov
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  3. Anastasia Enkova
    Anastasia Enkova avatar
    2 posts
    Registered:
    03 May 2010
    27 Jan 2011
    Link to this post
    The idea is  that post detail page is another  version of listing page with prev/next post navigation where by clicking prev/next user will be redirected to appropriate blogpost page.


    So,  for prev/next post. I need to add RadRotator with two linkbuttons  into ContentViewSingleItem.ascx template, bind it in custom class? How to determine what is prev/next posting? 

     GetContent() worked just perfectly.

    Thank you,
    Ana
  4. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    09 Dec 2016
    28 Jan 2011
    Link to this post
    Hello Anastasia,

    You can bind the Rotator to IList of content items which you can get with GetContent method. Another option is creating a datasource (using the same method GetContent) of IContent items and redirecting to a single item from your lists - in this case there will be a post back.

    Best wishes,
    Ivan Dimitrov
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Register for webinar
4 posts, 0 answered