function template_preprocess_book_export_html

Preprocesses variables for book-export-html.tpl.php.

The $variables array contains the following elements:

  • title
  • contents
  • depth

See also

book-export-html.tpl.php

File

drupal/core/modules/book/book.module, line 1205
Allows users to create and organize related content in an outline.

Code

function template_preprocess_book_export_html(&$variables) {
  global $base_url;
  $language_interface = language(LANGUAGE_TYPE_INTERFACE);
  $variables['title'] = check_plain($variables['title']);
  $variables['base_url'] = $base_url;
  $variables['language'] = $language_interface;
  $variables['language_rtl'] = $language_interface->direction == LANGUAGE_RTL;
  $variables['head'] = drupal_get_html_head();

  // HTML element attributes.
  $attributes = array();
  $attributes['lang'] = $language_interface->langcode;
  $attributes['dir'] = $language_interface->direction ? 'rtl' : 'ltr';
  $variables['html_attributes'] = new Attribute($attributes);
}