Список документов определённого типа с формированием обзорных страниц

<?php
  $content_type
= 'book';
 
$result1 = pager_query(db_rewrite_sql("SELECT n.nid, n.created FROM {node} n WHERE n.type = '$content_type' AND n.status = 1 ORDER BY n.created ASC"));
  while (
$node = db_fetch_object($result1)) {
   
$output .= node_view(node_load(array('nid' => $node->nid)), 1);
  }
$output .= theme('pager', NULL, $listlength);
print
$output;
?>

Метки: