block.tpl.php

  1. cis7 modules/block/block.tpl.php
  2. cis7 sites/all/themes/local_contrib/zurb-foundation/templates/block.tpl.php
  3. cis7 sites/all/themes/ulmus/fontfolio/templates/block.tpl.php
  4. cis7 sites/all/themes/ulmus/omega/alpha/templates/block.tpl.php
  5. cis7 sites/all/themes/ulmus/omega/omega/templates/block.tpl.php
  6. cis7 sites/all/themes/ulmus/adaptivetheme/at_core/templates/block.tpl.php
  7. cis7 sites/all/themes/ulmus/omega/starterkits/omega-xhtml/templates/block.tpl.php
  8. cle7 sites/all/themes/local_contrib/zurb_foundation/templates/block.tpl.php
  9. cle7 sites/all/themes/ulmus/fontfolio/templates/block.tpl.php
  10. cle7 sites/all/themes/local_contrib/zurb_foundation/templates/block.tpl.php
  11. cle7 sites/all/themes/ulmus/adaptivetheme/at_core/templates/block.tpl.php
  12. cle7 sites/all/themes/ulmus/omega/omega/templates/block.tpl.php
  13. cle7 sites/all/themes/ulmus/omega/alpha/templates/block.tpl.php
  14. cle7 sites/all/themes/ulmus/omega/starterkits/omega-xhtml/templates/block.tpl.php
  15. cle7 sites/all/themes/local_contrib/bootstrap/templates/block.tpl.php
  16. cle7 modules/block/block.tpl.php
  17. ecd7 sites/all/themes/ulmus/fontfolio/templates/block.tpl.php
  18. ecd7 sites/all/themes/ulmus/omega/alpha/templates/block.tpl.php
  19. ecd7 sites/all/themes/ulmus/omega/omega/templates/block.tpl.php
  20. ecd7 sites/all/themes/ulmus/adaptivetheme/at_core/templates/block.tpl.php
  21. ecd7 sites/all/themes/local_contrib/zurb_foundation/templates/block.tpl.php
  22. ecd7 modules/block/block.tpl.php
  23. ecd7 sites/all/themes/ulmus/omega/starterkits/omega-xhtml/templates/block.tpl.php
  24. elmsmedia7 sites/all/themes/ulmus/fontfolio/templates/block.tpl.php
  25. elmsmedia7 sites/all/themes/ulmus/omega/alpha/templates/block.tpl.php
  26. elmsmedia7 modules/block/block.tpl.php
  27. elmsmedia7 sites/all/themes/ulmus/adaptivetheme/at_core/templates/block.tpl.php
  28. elmsmedia7 sites/all/themes/ulmus/omega/starterkits/omega-xhtml/templates/block.tpl.php
  29. elmsmedia7 sites/all/themes/local_contrib/zurb_foundation/templates/block.tpl.php
  30. elmsmedia7 sites/all/themes/ulmus/omega/omega/templates/block.tpl.php
  31. harmony7 modules/block/block.tpl.php
  32. harmony7 sites/all/themes/ulmus/omega/starterkits/omega-xhtml/templates/block.tpl.php
  33. harmony7 sites/all/themes/ulmus/omega/alpha/templates/block.tpl.php
  34. harmony7 sites/all/themes/local_contrib/zurb_foundation/templates/block.tpl.php
  35. harmony7 sites/all/themes/ulmus/fontfolio/templates/block.tpl.php
  36. harmony7 sites/all/themes/local_contrib/bootstrap/theme/block/block.tpl.php
  37. harmony7 sites/all/themes/ulmus/adaptivetheme/at_core/templates/block.tpl.php
  38. harmony7 sites/all/themes/ulmus/omega/omega/templates/block.tpl.php
  39. icor7 sites/all/themes/local_contrib/zurb_foundation/templates/block.tpl.php
  40. icor7 sites/all/themes/ulmus/adaptivetheme/at_core/templates/block.tpl.php
  41. icor7 modules/block/block.tpl.php
  42. icor7 sites/all/themes/ulmus/omega/omega/templates/block.tpl.php
  43. icor7 sites/all/themes/ulmus/fontfolio/templates/block.tpl.php
  44. icor7 sites/all/themes/ulmus/omega/alpha/templates/block.tpl.php
  45. icor7 sites/all/themes/ulmus/omega/starterkits/omega-xhtml/templates/block.tpl.php
  46. meedjum_blog7 modules/block/block.tpl.php
  47. meedjum_blog7 sites/all/themes/ulmus/omega/alpha/templates/block.tpl.php
  48. meedjum_blog7 sites/all/themes/ulmus/omega/omega/templates/block.tpl.php
  49. meedjum_blog7 sites/all/themes/ulmus/adaptivetheme/at_core/templates/block.tpl.php
  50. meedjum_blog7 sites/all/themes/ulmus/omega/starterkits/omega-xhtml/templates/block.tpl.php
  51. meedjum_blog7 sites/all/themes/ulmus/fontfolio/templates/block.tpl.php
  52. meedjum_blog7 sites/all/themes/local_contrib/meedjum/templates/block.tpl.php
  53. meedjum_blog7 sites/all/themes/local_contrib/zurb_foundation/templates/block.tpl.php
  54. mooc7 modules/block/block.tpl.php
  55. mooc7 sites/all/themes/ulmus/fontfolio/templates/block.tpl.php
  56. mooc7 sites/all/themes/ulmus/omega/alpha/templates/block.tpl.php
  57. mooc7 sites/all/themes/ulmus/omega/omega/templates/block.tpl.php
  58. mooc7 sites/all/themes/ulmus/adaptivetheme/at_core/templates/block.tpl.php
  59. mooc7 sites/all/themes/ulmus/omega/starterkits/omega-xhtml/templates/block.tpl.php
  60. mooc7 sites/all/themes/local_contrib/zurb_foundation/templates/block.tpl.php

Adativetheme implementation to display a block.

The block template in Adaptivetheme is a little different to most other themes. Instead of hard coding its markup Adaptivetheme generates most of it in adaptivetheme_process_block(), conditionally printing outer and inner wrappers.

This allows the core theme to have just one template instead of five.

You can override this in your sub-theme with a normal block suggestion and use a standard block template if you prefer, or use your own themeName_process_block() function to control the markup. For example a typical navigation tempate might look like this:

<?php
<nav id="<?php print $block_html_id; ?>" class="<?php print $classes; ?>"php print $attributes; ?>>
  <div class="block-inner clearfix">
    <?php print render($title_prefix); ?>
    <?php if ($block->subject): ?>
      <h2<?php print $title_attributes; ?>><?php print $block->subject; ?></h2>
    <?php endif; ?>
    <?php print render($title_suffix); ?>
    <div<?php print $content_attributes; ?>>
      <?php print $content ?>
    </div>
  </div>
</nav>
?>

Adativetheme supplied variables:

  • $outer_prefix: Holds a conditional element such as nav, section or div and includes the block id, classes and attributes.
  • $outer_suffix: Closing element.
  • $inner_prefix: Inner div with .block-inner and .clearfix classes.
  • $inner_suffix: Closing div.
  • $title: Holds the block->subject.
  • $content_processed: Pre-wrapped in div and attributes, but for some blocks these are stripped away, e.g. menu bar and main content.
  • $is_mobile: Mixed, requires the Mobile Detect or Browscap module to return TRUE for mobile. Note that tablets are also considered mobile devices. Returns NULL if the feature could not be detected.
  • $is_tablet: Mixed, requires the Mobile Detect to return TRUE for tablets. Returns NULL if the feature could not be detected.

Available variables:

  • $block->subject: Block title.
  • $content: Block content.
  • $block->module: Module that generated the block.
  • $block->delta: An ID for the block, unique within each module.
  • $block->region: The block region embedding the current block.
  • $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 values can be one or more of the following:

    • block: The current template type, i.e., "theming hook".
    • block-[module]: The module generating the block. For example, the user module is responsible for handling the default user navigation block. In that case the class would be 'block-user'.
  • $title_prefix (array): An array containing additional output populated by modules, intended to be displayed in front of the main title tag that appears in the template.
  • $title_suffix (array): An array containing additional output populated by modules, intended to be displayed after the main title tag that appears in the template.

Helper variables:

  • $classes_array: Array of html class attribute values. It is flattened into a string within the variable $classes.
  • $block_zebra: Outputs 'odd' and 'even' dependent on each block region.
  • $zebra: Same output as $block_zebra but independent of any block region.
  • $block_id: Counter dependent on each block region.
  • $id: Same output as $block_id but independent of any block region.
  • $is_front: Flags true when presented in the front page.
  • $logged_in: Flags true when the current user is a logged-in member.
  • $is_admin: Flags true when the current user is an administrator.
  • $block_html_id: A valid HTML ID and guaranteed unique.

See also

template_preprocess()

template_preprocess_block()

template_process()

adaptivetheme_preprocess_block()

adaptivetheme_process_block()

7 theme calls to block.tpl.php
boxes_block_view in sites/all/modules/ulmus/boxes/boxes.module
Implements hook_block_view().
context-block-browser.tpl.php in sites/all/modules/ulmus/context/theme/context-block-browser.tpl.php
ds_render_block_field in sites/all/modules/ulmus/ds/ds.module
Render a block field.
poll_view_results in modules/poll/poll.module
Generates a graphical representation of the results of a poll.
theme_admin_page in modules/system/system.admin.inc
Returns HTML for an administrative page.

... See full list

189 string references to the theme hook from block.tpl.php

Note: this list is generated by looking for the string for this theme hook, so it may include some references that are not actually using this theme hook.

adaptivetheme_preprocess_block in sites/all/themes/ulmus/adaptivetheme/at_core/inc/preprocess.inc
Preprocess variables for block.tpl.php
adaptivetheme_preprocess_block in sites/all/themes/ulmus/adaptivetheme/at_core/inc/preprocess.inc
Preprocess variables for block.tpl.php
adaptivetheme_preprocess_panels_pane in sites/all/themes/ulmus/adaptivetheme/at_core/inc/preprocess.inc
Preprocess variables for panels_pane.tpl.php
adaptivetheme_process_block in sites/all/themes/ulmus/adaptivetheme/at_core/inc/process.inc
Process variables for block.tpl.php
adaptivetheme_process_block in sites/all/themes/ulmus/adaptivetheme/at_core/inc/process.inc
Process variables for block.tpl.php

... See full list

File

sites/all/themes/ulmus/adaptivetheme/at_core/templates/block.tpl.php
View source
  1. <?php
  2. /**
  3. * @file
  4. * Adativetheme implementation to display a block.
  5. *
  6. * The block template in Adaptivetheme is a little different to most other themes.
  7. * Instead of hard coding its markup Adaptivetheme generates most of it in
  8. * adaptivetheme_process_block(), conditionally printing outer and inner wrappers.
  9. *
  10. * This allows the core theme to have just one template instead of five.
  11. *
  12. * You can override this in your sub-theme with a normal block suggestion and use
  13. * a standard block template if you prefer, or use your own themeName_process_block()
  14. * function to control the markup. For example a typical navigation tempate might look
  15. * like this:
  16. *
  17. * @code
  18. * <nav id="<?php print $block_html_id; ?>" class="<?php print $classes; ?>"<?php print $attributes; ?>>
  19. * <div class="block-inner clearfix">
  20. * <?php print render($title_prefix); ?>
  21. * <?php if ($block->subject): ?>
  22. * <h2<?php print $title_attributes; ?>><?php print $block->subject; ?></h2>
  23. * <?php endif; ?>
  24. * <?php print render($title_suffix); ?>
  25. * <div<?php print $content_attributes; ?>>
  26. * <?php print $content ?>
  27. * </div>
  28. * </div>
  29. * </nav>
  30. * @endcode
  31. *
  32. * Adativetheme supplied variables:
  33. * - $outer_prefix: Holds a conditional element such as nav, section or div and
  34. * includes the block id, classes and attributes.
  35. * - $outer_suffix: Closing element.
  36. * - $inner_prefix: Inner div with .block-inner and .clearfix classes.
  37. * - $inner_suffix: Closing div.
  38. * - $title: Holds the block->subject.
  39. * - $content_processed: Pre-wrapped in div and attributes, but for some
  40. * blocks these are stripped away, e.g. menu bar and main content.
  41. * - $is_mobile: Mixed, requires the Mobile Detect or Browscap module to return
  42. * TRUE for mobile. Note that tablets are also considered mobile devices.
  43. * Returns NULL if the feature could not be detected.
  44. * - $is_tablet: Mixed, requires the Mobile Detect to return TRUE for tablets.
  45. * Returns NULL if the feature could not be detected.
  46. *
  47. * Available variables:
  48. * - $block->subject: Block title.
  49. * - $content: Block content.
  50. * - $block->module: Module that generated the block.
  51. * - $block->delta: An ID for the block, unique within each module.
  52. * - $block->region: The block region embedding the current block.
  53. * - $classes: String of classes that can be used to style contextually through
  54. * CSS. It can be manipulated through the variable $classes_array from
  55. * preprocess functions. The default values can be one or more of the
  56. * following:
  57. * - block: The current template type, i.e., "theming hook".
  58. * - block-[module]: The module generating the block. For example, the user
  59. * module is responsible for handling the default user navigation block. In
  60. * that case the class would be 'block-user'.
  61. * - $title_prefix (array): An array containing additional output populated by
  62. * modules, intended to be displayed in front of the main title tag that
  63. * appears in the template.
  64. * - $title_suffix (array): An array containing additional output populated by
  65. * modules, intended to be displayed after the main title tag that appears in
  66. * the template.
  67. *
  68. * Helper variables:
  69. * - $classes_array: Array of html class attribute values. It is flattened
  70. * into a string within the variable $classes.
  71. * - $block_zebra: Outputs 'odd' and 'even' dependent on each block region.
  72. * - $zebra: Same output as $block_zebra but independent of any block region.
  73. * - $block_id: Counter dependent on each block region.
  74. * - $id: Same output as $block_id but independent of any block region.
  75. * - $is_front: Flags true when presented in the front page.
  76. * - $logged_in: Flags true when the current user is a logged-in member.
  77. * - $is_admin: Flags true when the current user is an administrator.
  78. * - $block_html_id: A valid HTML ID and guaranteed unique.
  79. *
  80. * @see template_preprocess()
  81. * @see template_preprocess_block()
  82. * @see template_process()
  83. * @see adaptivetheme_preprocess_block()
  84. * @see adaptivetheme_process_block()
  85. */
  86. ?>
  87. <?php print $outer_prefix . $inner_prefix; ?>
  88. <?php print render($title_prefix); ?>
  89. <?php if ($title): ?>
  90. <h2<?php print $title_attributes; ?>><?php print $title; ?></h2>
  91. <?php endif; ?>
  92. <?php print $content_processed; ?>
  93. <?php print render($title_suffix); ?>
  94. <?php print $inner_suffix . $outer_suffix; ?>
Error | ELMSLN API

Error

×

Error message

  • Warning: Cannot modify header information - headers already sent by (output started at /var/www/html/elmsln_community/api.elmsln.org/includes/common.inc:2791) in drupal_send_headers() (line 1499 of /var/www/html/elmsln_community/api.elmsln.org/includes/bootstrap.inc).
  • Error: Call to undefined function apc_delete() in DrupalAPCCache->clear() (line 289 of /var/www/html/elmsln_community/api.elmsln.org/sites/all/modules/apc/drupal_apc_cache.inc).
The website encountered an unexpected error. Please try again later.