taxonomy_page_attachments_alter
function taxonomy_page_attachments_alter
taxonomy_page_attachments_alter(array &$page)
Implements hook_page_attachments_alter().
File
- core/modules/taxonomy/taxonomy.module, line 92
- Enables the organization of content into categories.
Code
function taxonomy_page_attachments_alter(array &$page) { $route_match = \Drupal::routeMatch(); if ($route_match->getRouteName() == 'entity.taxonomy_term.canonical' && ($term = $route_match->getParameter('taxonomy_term')) && $term instanceof TermInterface) { foreach ($term->