function book_render in Drupal 4
Same name and namespace in other branches
- 5 modules/book/book.module \book_render()
- 6 modules/book/book.pages.inc \book_render()
- 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.module - Implementation of hook_menu().
File
- modules/
book.module, line 634 - 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 AND n.moderate = 0 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);
}