function hook_taxonomy_term_view
hook_taxonomy_term_view($term, $view_mode, $langcode)
Act on a taxonomy term that is being assembled before rendering.
The module may add elements to $term->content prior to rendering. The structure of $term->content is a renderable array as expected by drupal_render().
Parameters
$term: The term that is being assembled for rendering.
$view_mode: The $view_mode parameter from taxonomy_term_view().
$langcode: The language code used for rendering.
See also
Related topics
File
- modules/taxonomy/taxonomy.api.php, line 193
- Hooks provided by the Taxonomy module.
Code
function hook_taxonomy_term_view($term, $view_mode, $langcode) { $term->content['my_additional_field'] = array( '#markup' => $additional_field, '#weight' => 10, '#theme' => 'mymodule_my_additional_field', ); }
© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/modules!taxonomy!taxonomy.api.php/function/hook_taxonomy_term_view/7.x