You are here

function book_render in Drupal 5

Same name and namespace in other branches
  1. 4 modules/book.module \book_render()
  2. 6 modules/book/book.pages.inc \book_render()
  3. 7 modules/book/book.pages.inc \book_render()

Menu callback; prints a listing of all books.

1 string reference to 'book_render'
book_menu in modules/book/book.module
Implementation of hook_menu().

File

modules/book/book.module, line 610
Allows users to collaboratively author a book.

Code

function book_render() {
  $result = db_query(db_rewrite_sql('SELECT n.nid, n.title, b.weight FROM {node} n INNER JOIN {book} b ON n.vid = b.vid WHERE b.parent = 0 AND n.status = 1 ORDER BY b.weight, n.title'));
  $books = array();
  while ($node = db_fetch_object($result)) {
    $books[] = l($node->title, 'node/' . $node->nid);
  }
  return theme('item_list', $books);
}