taxonomy_render_nodes

Versions
4.6 – 6
taxonomy_render_nodes($result)

Accepts the result of a pager_query() call, such as that performed by taxonomy_select_nodes(), and formats each node along with a pager.

Code

modules/taxonomy.module, line 1141

<?php
function taxonomy_render_nodes($result) {
  if (db_num_rows($result) > 0) {
    while ($node = db_fetch_object($result)) {
      $output .= node_view(node_load($node->nid), 1);
    }
    $output .= theme('pager', NULL, variable_get('default_nodes_main', 10), 0);
  }
  else {
    $output .= t('There are currently no posts in this category.');
  }
  return $output;
}
?>
Login or register to post comments
 
 

All source code and documentation on this site is released under the terms of the GNU General Public License, version 2 and later. Drupal is a registered trademark of Dries Buytaert.