You are here

function template_preprocess_sitemap_taxonomy_term in Sitemap 2.0.x

Same name and namespace in other branches
  1. 8.2 sitemap.theme.inc \template_preprocess_sitemap_taxonomy_term()

Preprocess variables for sitemap-taxonomy-term.html.twig.

Parameters

array $variables: An associative array containing:

  • name: The name of the taxonomy term.
  • url: The URL to the taxonomy term.
  • show_count: Whether or not to display the number of nodes using the term.
  • count: The number of nodes using this taxonomy term.
  • show_feed: Whether or not to display the RSS feed link for this term.
  • feed: The URL to the taxonomy term's feed.

File

./sitemap.theme.inc, line 45
Sitemap theme preprocessors.

Code

function template_preprocess_sitemap_taxonomy_term(array &$variables) {
  if ($variables['show_feed'] && $variables['feed']) {
    $variables['feed_icon'] = _sitemap_rss_feed_icon();
  }
}