Skip navigation
Help

toolbar.tpl.php

  1. drupal
    1. 7 drupal/modules/toolbar/toolbar.tpl.php

Default template for admin toolbar.

Available variables:

  • $classes: String of classes that can be used to style contextually through CSS. It can be manipulated through the variable $classes_array from preprocess functions. The default value has the following:

    • toolbar: The current template type, i.e., "theming hook".
  • $toolbar['toolbar_user']: User account / logout links.
  • $toolbar['toolbar_menu']: Top level management menu links.
  • $toolbar['toolbar_drawer']: A place for extended toolbar content.

Other variables:

  • $classes_array: Array of html class attribute values. It is flattened into a string within the variable $classes.

See also

template_preprocess()

template_preprocess_toolbar()

File

drupal/modules/toolbar/toolbar.tpl.php
View source
  1. <?php
  2. /**
  3. * @file
  4. * Default template for admin toolbar.
  5. *
  6. * Available variables:
  7. * - $classes: String of classes that can be used to style contextually through
  8. * CSS. It can be manipulated through the variable $classes_array from
  9. * preprocess functions. The default value has the following:
  10. * - toolbar: The current template type, i.e., "theming hook".
  11. * - $toolbar['toolbar_user']: User account / logout links.
  12. * - $toolbar['toolbar_menu']: Top level management menu links.
  13. * - $toolbar['toolbar_drawer']: A place for extended toolbar content.
  14. *
  15. * Other variables:
  16. * - $classes_array: Array of html class attribute values. It is flattened
  17. * into a string within the variable $classes.
  18. *
  19. * @see template_preprocess()
  20. * @see template_preprocess_toolbar()
  21. */
  22. ?>
  23. <div id="toolbar" class="<?php print $classes; ?> clearfix">
  24. <div class="toolbar-menu clearfix">
  25. <?php print render($toolbar['toolbar_home']); ?>
  26. <?php print render($toolbar['toolbar_user']); ?>
  27. <?php print render($toolbar['toolbar_menu']); ?>
  28. <?php if ($toolbar['toolbar_drawer']):?>
  29. <?php print render($toolbar['toolbar_toggle']); ?>
  30. <?php endif; ?>
  31. </div>
  32. <div class="<?php echo $toolbar['toolbar_drawer_classes']; ?>">
  33. <?php print render($toolbar['toolbar_drawer']); ?>
  34. </div>
  35. </div>