template_preprocess_book_all_books_block

Versions
7
template_preprocess_book_all_books_block(&$variables)

Process variables for book-all-books-block.tpl.php.

The $variables array contains the following arguments:

  • $book_menus

All non-renderable elements are removed so that the template has full access to the structured data but can also simply iterate over all elements and render them (as in the default template).

See also

book-navigation.tpl.php

Code

modules/book/book.module, line 933

<?php
function template_preprocess_book_all_books_block(&$variables) {
  // Remove all non-renderable elements.
  $elements = $variables['book_menus'];
  $variables['book_menus'] = array();
  foreach (element_children($elements) as $index) {
    $variables['book_menus'][$index] = $elements[$index];
  }
}
?>
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.