In this tutorial we will show only Articles that are promoted to the front page, authored in the last 2 hours and sorted so that the articles with most comments are on top.
Video has more explanations and examples!
- Click Add next to FILTER CRITERIA:
- Search for Promoted to front page and select the Promoted to front page status as Yes:
Now only the Articles with Promoted to front page checked in the Publishing options will be listed in the front page.
You want to show only articles that have been created in the last 2 hours.
- Add a filter Content: Authored on with these settings:
You could for example create multiple View Displays for articles created 2-3 hours ago, 3-4 hours ago etc. Like you see in the news sites.
- Create more articles with comments in Configuration > Development > Generate Content
- Add another field called Comments Count with a label Comments :
- Click Add next to SORT CRITERIA and add a Comment count criteria. Select the order as Sort descending:
The view so far:
In the picture you see that we have the Authored on sorting before the comment sort,
so if you add newer articles, they will show first, regardless of the comments they have. Just remove the Authored on sort if you want to see the most commented always first.
Our view now shows only Articles that are promoted to the front page, authored in the last 2 hours and sorted so that the articles with most comments are on top.