Try Now
More in this section

Forums / Designing with Sitefinity / Rework BlogArchive?

Rework BlogArchive?

2 posts, 0 answered
  1. Magnus
    Magnus avatar
    28 posts
    26 May 2009
    15 Dec 2009
    Link to this post

    I'm curious if there's a way to recreate the BlogArchive-template a bit? I need to change the design for the levels. i also need to add some text (Post Title) with a direct link to the Blog Post. Is that possible?

    I've attached a figure which might give you a more clear picture of what i'm trying to do.

    Thanks for all kind of help.

    / Magnus
  2. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    19 Oct 2016
    15 Dec 2009
    Link to this post
    Hi Magnus,

    It is not possible to use only the template of BlogArchive to achieve desired functionality, because the right image represents completely different control where you have to use Repeater control , since BlogsArhive uses TreeView. You need to create a custom class that inherits from SimpleControl. then override LayoutTemplatePath and set the path to your new custom template. The template should contain ASP.NET Repeater control. In the ItemTempalte of the repeater control you need to have another Repeater. the first repeater will show the month - you can use literal control. The second repeater have to contain hyperLink control. In the second repeater, ItemDataBound even you need to get all content items and set their Titles as Text property of the HyperLink. You should also add a Literal control that will show the Publication_Date of each item.Greetings,

    Generally you need to get all blog posts and using foreach you have to loop throuch each item Publication_Date or/and Expiration_Date metadate using GetMetaData method. By doing so you will be able to separate the items by month and year.

    Ivan Dimitrov
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
2 posts, 0 answered