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



<?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);
  }
print
$output;
$output .= theme('pager', NULL, $listlength);
?>

Comments

Post new comment

The content of this field is kept private and will not be shown publicly.
Image CAPTCHA
Copy the characters (respecting upper/lower case) from the image.