2

I currently have a view; I would like to select the top 4 most recent nodes, and then display them in a random order.

I think it would work if they were all posted on the same day. I have a "sort by date," and then I am using the random seed module to randomize the results.

However, if they occurred on different days, the random does not take effect because it is sorting first by day.

Does anyone have any advice?

2

I'm not sure if I understand your requirement correctly but you can the following:

  1. Create a views of node (teaser, fields.. whatever you need)
  2. Sort by date (following the granularity you need)
  3. Add a "Global: Random" sorting
| improve this answer | |
1

You can do it with two displays, one as your block/page and the other one as attachment, that you setup as attached to your first display.
The first is your normal display, with four most recent results; the attachment shows the results in random order.

The only tricky problem is to avoid the first nodes appear into the second display, but you can find many ways to achieve it.

| improve this answer | |
  • Hmm... I'm not familiar with views attachments. I will have to look this up. Thanks! – Scott Sep 2 '11 at 13:04
  • @yvan - any suggestions for achieving the tricky bit? – Andy Oct 2 '11 at 7:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.