theme_taxonomy_term_page

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

modules/taxonomy/taxonomy.pages.inc, строка 87

Версии
6
theme_taxonomy_term_page($tids, $result)

Рендерит HTML-представление страницы термина таксономии.

Параметры

$tids Массив идентификаторов терминов.

$result Результат функции pager_query(), например, возвращенный из taxonomy_select_nodes().

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

▾ 1 функция вызывает theme_taxonomy_term_page()

taxonomy_term_page in modules/taxonomy/taxonomy.pages.inc
Коллбэк меню; отображает все ноды, связанные с термином таксономии.

Код

<?php
function theme_taxonomy_term_page($tids, $result) {
  drupal_add_css(drupal_get_path('module', 'taxonomy') .'/taxonomy.css');

  $output = '';

  // Only display the description if we have a single term, to avoid clutter and confusion.
  if (count($tids) == 1) {
    $term = taxonomy_get_term($tids[0]);
    $description = $term->description;

    // Check that a description is set.
    if (!empty($description)) {
      $output .= '<div class="taxonomy-term-description">';
      $output .= filter_xss_admin($description);
      $output .= '</div>';
    }
  }

  $output .= taxonomy_render_nodes($result);

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

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