[support] Getting A View to "ORDER BY RAND ()"

Brian Choc bchoc at t4tcolorado.org
Tue Jul 15 22:15:37 UTC 2008


Add the criteria "Random" (it's listed as a field) . does that do what
you're looking to do?

 

Brian

 

 

From: support-bounces at drupal.org [mailto:support-bounces at drupal.org] On
Behalf Of Shai Gluskin
Sent: Tuesday, July 15, 2008 4:12 PM
To: support at drupal.org
Subject: [support] Getting A View to "ORDER BY RAND ()"

 

I have a need for Views to "ORDER BY RAND ()"

The use-case is that I want to pull in the teaser of a particular
content-type for one node only onto the home page. I want it to randomly
select the node it displays.

Everything is easy except the random part. The home page is a panel page.
I've built a view, filtered on content-type, set the number of nodes to
display at "1" -- successfully pulled it into the panel.

I thought the way to do this would be to set a sort criteria. But I see only
"ascending" and "descending" -- I don't see "random" as a choice.

Any ideas?

I'm using Drupal 5.8,  Views 1.6 and Panels 2 Beta

Thanks,

Shai

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.drupal.org/pipermail/support/attachments/20080715/eab6c377/attachment-0001.htm 


More information about the support mailing list