Getting an array of nodes
mediumgrade - May 5, 2007 - 08:25
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?
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
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
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
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...
I think there is already a module to do that. http://drupal.org/project/quotes
Nancy W.
Drupal Cookbook (for New Drupallers)
Adding Hidden Design or How To notes in your database
If memory serves me correctly...
double posted