News list: displaying 2nd most recent article - Front- & Back-End Development - Front- & Back-End Development - Progress Community
 Front- & Back-End Development

News list: displaying 2nd most recent article

  • News list: displaying 2nd most recent article
  • Is it possible to start a news list with the 2nd most recently published article? I want to avoid any manual intervention, so additional tags or categories wouldn't work here.

    I have two separate news lists, with the first displaying the most recently published article. To avoid duplication, the other list needs to display everything from the 2nd most recently published article.

    Any suggestions very gratefully received!
  • I think you'd need a custom control to grab the second most recent...(So like .OrderBy(x => x.PublicationDate).Skip(1).Take(1) ) I don't think a filter or sort expression would work in the default control.

    ...I mean you COULD always just show "2" and use CSS to hide the first item if you aren't that concerned about there being 1 invisible item. <newsitemclass>:first-child display:none

    ?
  • Thanks Steve; I'll look in to the custom control option. Unfortunately, I need to use first-child to apply a different style to the first item, otherwise I'd happily use this.
  • Okay, nth child?

    www.w3schools.com/.../sel_nth-child.asp