Scrolling News Web Part

Mike Rainsbury asked on September 18, 2015 12:40

Hi,

I am using the Scrolling News web part on my home page and been able to set it so it only displays 5 articles.

Is there a way to set it so it orders them by the articles release date rather than the date published? We have been adding some news archives to our site - as they have been added recently they are displaying on the scrolling news feed whereas we would like it to show the latest articles.

Thanks for your help Mike

Correct Answer

Maarten van den Hooven answered on September 18, 2015 16:11

No problem Mike, you needed to add de DESC (decending) after the column name else it wil take ASC (ascending) as standard for ordering.

This is not Kentico code but SQL, SQL is an language to talk with your data (Database).

You can read a lot on W3Schools.

If this answer helped you, please vote for my answer :-)

0 votesVote for this answer Unmark Correct answer

Recent Answers


Maarten van den Hooven answered on September 18, 2015 12:48 (last edited on September 18, 2015 16:07)

Hi Mike, Of course that is no problem in the "ORDER BY expression" field of the webpart you can put your column name and then desc. For example in your case : "NewsReleaseDate DESC".

0 votesVote for this answer Mark as a Correct answer

Mike Rainsbury answered on September 18, 2015 12:57

Thanks Maarten

You will have to excuse me as I'm not a developer! I have added in "NewsReleaseDate" into the ORDER BY expression field and now it starts from the oldest article. What would my description be to it orders from the latest release?

Thanks Mike

0 votesVote for this answer Mark as a Correct answer

Suneel Jhangiani answered on September 18, 2015 13:32

Just use "NewsReleaseDate DESC"

note: The DESC to indicate descending order (ie. newest to oldest). This is because by default SQL will use ASC (ascending) order.

0 votesVote for this answer Mark as a Correct answer

Mike Rainsbury answered on September 18, 2015 16:20

Thats great thank you very much!

0 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.