Getting an array of nodes

I have a CCK node type called "quotes." Basically, I want to be able to display a random quote within a block.

What is the best way to get this done?

views.module

svetlin - May 5, 2007 - 09:06

Try Views. In the view administration page in the block section check "Provide block".
In "Filters" choose Node:Type Is One Of quotes.
In "Sort Criteria" choose Random

views.module

svetlin - May 5, 2007 - 09:07

Try Views. In the view administration page in the block section check "Provide block", Nodes per Block should be 1.
In "Filters" choose Node:Type Is One Of quotes.
In "Sort Criteria" choose Random

I want to style this a bit

mediumgrade - May 8, 2007 - 10:19

I want to style this a bit as well (IE, make the quote itself italicized, blah, blah.)

Also, I have another node type called "business" I use for storing clients in my business network. Ideally, I would like to link this business node to the quote node so that in my block, this is a quote, and a link to the business who made it. How do I reference the objects in this way with the API?

Thanks!

If memory serves me correctly...

NancyDru - May 5, 2007 - 13:43

double posted

 
 

Drupal is a registered trademark of Dries Buytaert.