Skip to main content
removed "Drupal" and tags from the title; edited tags
Source Link
avpaderno
  • 97.9k
  • 15
  • 164
  • 284

Is there a Drupal API function to get the list of nodes by type?

Is there a Drupal API function like node_load() that will returnreturns a list of nodes by a given content type?

I've tried $nodes = node_load(array("type" => 'student_vote')), but it only returns one node.

I know I could code up something like node_load(), but I wanted to see if there might be anything like that out there already.

Is there a Drupal API function to get the list of nodes by type?

Is there a Drupal API function like node_load() that will return a list of nodes by a given type?

I've tried $nodes = node_load(array("type" => 'student_vote')), but it only returns one node.

I know I could code up something like node_load(), but I wanted to see if there might be anything like that out there already.

Is there a function to get the list of nodes by type?

Is there a function like node_load() that returns a list of nodes by a given content type?

I've tried $nodes = node_load(array("type" => 'student_vote')), but it only returns one node.

I know I could code up something like node_load(), but I wanted to see if there might be anything like that out there already.

Tweeted twitter.com/StackDrupal/status/722874954442764289
Post Migrated Here from stackoverflow.com (revisions)
Source Link
user357712
user357712

Is there a Drupal API function to get the list of nodes by type?

Is there a Drupal API function like node_load() that will return a list of nodes by a given type?

I've tried $nodes = node_load(array("type" => 'student_vote')), but it only returns one node.

I know I could code up something like node_load(), but I wanted to see if there might be anything like that out there already.