bootstrap_storybook-8.x-2.0/includes/taxonomy.inc

includes/taxonomy.inc
<?php

/**
 * @file
 * Theme and preprocess functions for taxonomy and vocabularies.
 */

/**
 * Implements hook_theme_suggestions_taxonomy_term_alter().
 */
function bootstrap_storybook_theme_suggestions_taxonomy_term_alter(array &$suggestions, array $variables) {
  /** @var \Drupal\taxonomy\TermInterface $term */
  $term = $variables['elements']['#taxonomy_term'];
  $sanitized_view_mode = strtr($variables['elements']['#view_mode'], '.', '_');
  // Add view mode theme suggestions.
  $suggestions[] = 'taxonomy_term__' . $sanitized_view_mode;
  $suggestions[] = 'taxonomy_term__' . $term->bundle() . '__' . $sanitized_view_mode;
  $suggestions[] = 'taxonomy_term__' . $term->id() . '__' . $sanitized_view_mode;
}

Главная | Обратная связь

drupal hosting | друпал хостинг | it patrol .inc