This project is read-only.

How to add a Lead Story to theme?

Topics: Themes
Jul 11, 2012 at 3:13 AM
Edited Jul 11, 2012 at 3:16 AM

I have set up a new theme - a standard 2 column layout with the posts in the content column in 2 columns - similiar to the Daily Caller. I want to add a Lead Story  item to the top of the content column. Best way to see what I want is to view They have the nice big image and headline as the lead and then other stories below. What would be the best way to implement a lead story? Widget, a new admin page to edit the led story, or???


I have a seen a couple of Featured Story widgets. One I tried gave me a yellow screen of death.

Jul 11, 2012 at 5:30 AM

Take a look at one of "arthemia" themes, this one for example. It splits PostView.ascx into several views with "lead story" been one of them. Then it populates this view with posts in specific category:

List<Post> tmp = BlogEngine.Core.Post.GetPostsByCategory(new Guid(settings["HeadlineCategory"]));

Then any post(s) within "HeadlineCategory" will be displayed in the lead story section ("just in" in the example).

Jul 11, 2012 at 9:14 PM

OK Thanks that gets part of the way there. Now the only hitch is that the lea story appears twice - once as lead and again directly underneath. I though I could use skip(1) but its not available via intellisense. Any thoughts on how to skip the first record so the lead is not duplicated?