1 taxonomy.module taxonomy_term_build_content($term, $view_mode = 'full', $langcode = NULL)

Builds a structured array representing the term's content.

The content built for the taxonomy term (field values, file attachments or other term components) will vary depending on the $view_mode parameter.

Backdrop core defines the following display modes for terms, with the following default use cases:

  • full (default): term is displayed on its own page (taxonomy/term/123)

Contributed modules might define additional display modes, or use existing display modes in additional contexts.


$term: A taxonomy term object.

$view_mode: (optional) Display mode, e.g. 'full' or 'teaser'. Defaults to 'full'.

$langcode: (optional) A language code to use for rendering. Defaults to the global content language of the current request.


core/modules/taxonomy/taxonomy.module, line 807
Enables the organization of content into categories.


function taxonomy_term_build_content($term, $view_mode = 'full', $langcode = NULL) {
  $term->buildContent($view_mode, $langcode);