theme_blocks

Хочешь помочь с переводом? Это очень просто и быстро. Лишь зарегистрируйся, и можешь тут же начать переводить.

includes/theme.inc, строка 1022

Версии
5 – 6
theme_blocks($region)

Возвращает набор блоков, доступных для текущего пользователя.

Параметры

$region Регион для которого требуется загрузить набор блоков ('header', 'content', 'footer', ...)

Возвращаемое значение

Строка, содержащая темизированные блоки региона.

Связанные темы

▾ 4 функции вызывают theme_blocks()

chameleon_page in themes/chameleon/chameleon.theme
phptemplate_page in themes/engines/phptemplate/phptemplate.engine
Prepare the values passed to the theme_page function to be passed into a pluggable template engine. Uses the arg() function to generate a series of page template files suggestions based on the current path. If none are found, the default page.tpl.php...
theme_page in includes/theme.inc
Return an entire Drupal page displaying the supplied content.
_phptemplate_default_variables in themes/engines/phptemplate/phptemplate.engine
Adds additional helper variables to all templates.

Код

<?php
function theme_blocks($region) {
  $output = '';

  if ($list = block_list($region)) {
    foreach ($list as $key => $block) {
      // $key == <i>module</i>_<i>delta</i>
      $output .= theme('block', $block);
    }
  }

  // Add any content assigned to this region through drupal_set_content() calls.
  $output .= drupal_get_content($region);

  return $output;
}
?>
Войдите или зарегистрируйтесь, чтобы получить возможность отправлять комментарии

Вход в систему