diff --git a/core/modules/taxonomy/taxonomy.module b/core/modules/taxonomy/taxonomy.module index 7b46a9c..3c4cab2 100644 --- a/core/modules/taxonomy/taxonomy.module +++ b/core/modules/taxonomy/taxonomy.module @@ -549,11 +549,12 @@ function taxonomy_term_view_multiple(array $terms, $view_mode = 'full', $langcod */ function template_preprocess_taxonomy_term(&$variables) { $variables['view_mode'] = $variables['elements']['#view_mode']; - $term = $variables['term'] = $variables['elements']['#term']; + $variables['term'] = $variables['elements']['#term']; + $term = $variables['term']; $uri = $term->uri(); $variables['url'] = url($uri['path'], $uri['options']); - $variables['title'] = check_plain($term->label()); + $variables['label'] = check_plain($term->label()); $variables['page'] = $variables['view_mode'] == 'full' && taxonomy_term_is_page($term); // Helpful $content variable for templates. diff --git a/core/modules/taxonomy/templates/taxonomy-term.html.twig b/core/modules/taxonomy/templates/taxonomy-term.html.twig index 1e84dcb..378a8a8 100644 --- a/core/modules/taxonomy/templates/taxonomy-term.html.twig +++ b/core/modules/taxonomy/templates/taxonomy-term.html.twig @@ -6,24 +6,18 @@ * Available variables: * - url: Direct URL of the current term. * - title: Name of the current term. - * - title_prefix: Additional output populated by modules, intended to be - * displayed in front of the main title tag that appears in the template. - * - title_suffix: Additional output populated by modules, intended to be - * displayed after the main title tag that appears in the template. * - content: Items for the content of the term (fields and description). * Use 'content' to print them all, or print a subset such as * 'content.field_example'. Use {% hide(content.field_example) %} to * temporarily suppress the printing of a given element. - * - attributes: HTML attributes for the containing element. - * - title_attributes: HTML attributes for the title element. - * - content_attributes: HTML attributes for the title element. - * It includes the 'class' information, which includes: - * - taxonomy-term: The current template type, i.e., "theming hook". - * - vocabulary-[vocabulary-name]: The vocabulary that this term belongs to. - * For example, if the term is a "Tag" it would result in "vocabulary-tag". + * - attributes: HTML attributes for the containing element. It includes + * the 'class' information, which includes: + * - taxonomy-term: The current template type, i.e., "theming hook". + * - vocabulary-[vocabulary-name]: The vocabulary that this term belongs to. + * For example, if the term is a "Tag" it would result in "vocabulary-tag". * - page: Flag for the full page state. * - term: Full term object. - * - view_mode: View mode, e.g. 'full', 'teaser'... + * - view_mode: View mode, e.g. 'full', 'teaser', etc. * - user: The currently logged-in user. * * @see template_preprocess() @@ -33,12 +27,13 @@ */ #}