You are here

function _site_map_taxonomys in Site map 6.2

Same name and namespace in other branches
  1. 5 site_map.module \_site_map_taxonomys()
  2. 6 site_map.module \_site_map_taxonomys()
  3. 7 site_map.module \_site_map_taxonomys()

This function can be called from blocks or pages as desired.

1 call to _site_map_taxonomys()
template_preprocess_site_map in ./site_map.theme.inc
Process variables for site-map.tpl.php.

File

./site_map.module, line 319
site_map.module

Code

function _site_map_taxonomys() {
  $output = '';
  $vids = array_filter(variable_get('site_map_show_vocabularies', array()));
  if (module_exists('taxonomy') && !empty($vids)) {
    $result = db_query('SELECT vid, name, description FROM {vocabulary} WHERE vid IN (' . db_placeholders($vids, 'int') . ') ORDER BY weight ASC, name', $vids);
    while ($t = db_fetch_object($result)) {
      if (module_exists('i18ntaxonomy')) {
        $t->name = tt("taxonomy:vocabulary:{$t->vid}:name", $t->name);
      }
      $output .= _site_map_taxonomy_tree($t->vid, $t->name, $t->description);
    }
  }
  return $output;
}