taxonomy_theme_suggestions_taxonomy_term

taxonomy_theme_suggestions_taxonomy_term(array $variables)

Implements hook_theme_suggestions_HOOK().

File

core/modules/taxonomy/taxonomy.module, line 225
Enables the organization of content into categories.

Code

function taxonomy_theme_suggestions_taxonomy_term(array $variables) {
  $suggestions = array();

  /** @var \Drupal\taxonomy\TermInterface $term */
  $term = $variables['elements']['#taxonomy_term'];

  $suggestions[] = 'taxonomy_term__' . $term->bundle();
  $suggestions[] = 'taxonomy_term__' . $term->id();

  return $suggestions;
}
doc_Drupal
2016-10-29 09:46:34
Comments
Leave a Comment

Please login to continue.