News list: displaying 2nd most recent article

Posted by Community Admin on 05-Aug-2018 11:18

News list: displaying 2nd most recent article

All Replies

Posted by Community Admin on 01-Aug-2013 00:00

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!

Posted by Community Admin on 01-Aug-2013 00:00

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

?

Posted by Community Admin on 02-Aug-2013 00:00

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.

Posted by Community Admin on 02-Aug-2013 00:00
This thread is closed