[development] Drupal 7 Entities - view random node

Blaine Lang Blaine.Lang at nextide.ca
Sun Jan 23 19:33:34 UTC 2011

I have a need for a block that will display a random quote. Node type =
'random_quote' and only 1 random record should be displayed

In D7 the body contents are in field_data_body and I have it working
using the DB API but it would probably be better using the
entityController class methods like 'entity_load'

I see that you can pass in conditions but is it possible to return a
single random record?

Does anyone with more experience with the new EntityController have any


More information about the development mailing list