Profile picture for user admin
Daniel Sipos
13 Sep 2012

Say you want to display some content with Views, make even a slideshow of images (or text or whatever content you may have). But, you want this to appear in random order. No problem. Just go to Sort Criteria, filter down to Global and Select Global: Random. Then you can save and test your View.

Hope this helps!

Profile picture for user admin

Daniel Sipos

CEO @ Web Omelette

Danny founded WEBOMELETTE in 2012 as a passion project, mostly writing about Drupal problems he faced day to day, as well as about new technologies and things that he thought other developers would find useful. Now he now manages a team of developers and designers, delivering quality products that make businesses successful.

Contact us

Comments

Alex 24 Sep 2013 10:23

Thank you

This views sort criteria works flawlessly. I have built so many websites on Drupal 7 and this is the first i use this. There is much to learn in this charming CMS :)

Allan Chappell 19 Feb 2014 22:30

Pagination woes

This doesn't work when you have pagination. The random runs again so it appears as if you have duplicates in your result set.

Preksha 30 Oct 2014 15:48

Same Global: random for multiple views

Hi,

This is really nice thing. I want the random in multiple view panes. Like I have entity reference field for taxonomy term and some contents are tagged with it. On site home page I have different content block for one taxonomy term. now I want like, after some days or lets say randomly all contents should be changed for the other taxonomy term.

How can we achieve such thing?

Any idea?

Karolina 04 Jun 2015 11:34

In reply to by Preksha (not verified)

Views random module

I think you don't need help after 6 months but it could be useful for those who are searching the answer like me. You can use the module "views_random_seed".

Alessandro 02 Feb 2015 18:25

And If i want random trough last 10 nodes?

And If i want random trough last 10 nodes?

Travis 08 May 2017 18:10

Drupal 8?

Does this work in drupal 8? I don't see the random option

Belanger 25 May 2018 23:04

Random not working - cache issue?

Hi,

This is actually working nicely if we are connected in Drupal but for anonymous user it's not. So I have removed the cache on the view but still have the same problem. Any idea why?

tobiasaldgard 12 Jun 2018 17:01

How often does it change?

Hi,

I managed to create a views block with random advertising. But I don't get what's the trigger point for the image to change? Would be awesome to make it change image as soon as visitor is going to a different node on the page. Is that possible?

//Tobias

Add new comment