function hook_field_attach_view_alter


Error message

User warning: The following module is missing from the file system: theme/theme. For information about how to fix this, see the documentation page. in _drupal_trigger_error_with_delayed_logging() (line 1156 of /var/www/html/elmsln_community/
cis7 field.api.php hook_field_attach_view_alter(&$output, $context)
cle7 field.api.php hook_field_attach_view_alter(&$output, $context)
elmsmedia7 field.api.php hook_field_attach_view_alter(&$output, $context)
icor7 field.api.php hook_field_attach_view_alter(&$output, $context)
meedjum_blog7 field.api.php hook_field_attach_view_alter(&$output, $context)
mooc7 field.api.php hook_field_attach_view_alter(&$output, $context)

Perform alterations on field_attach_view() or field_view_field().

This hook is invoked after the field module has performed the operation.


$output: The structured content array tree for all of the entity's fields.

$context: An associative array containing:

  • entity_type: The type of $entity; for example, 'node' or 'user'.
  • entity: The entity with fields to render.
  • view_mode: View mode; for example, 'full' or 'teaser'.
  • display: Either a view mode string or an array of display settings. If this hook is being invoked from field_attach_view(), the 'display' element is set to the view mode string. If this hook is being invoked from field_view_field(), this element is set to the $display argument and the view_mode element is set to '_custom'. See field_view_field() for more information on what its $display argument contains.
  • language: The language code used for rendering.

Related topics

8 functions implement hook_field_attach_view_alter()

Note: this list is generated by pattern matching, so it may include some functions that are not actually implementations of this hook.

accessibility_content_field_attach_view_alter in sites/all/modules/ulmus/accessibility/modules/accessibility_content/accessibility_content.module
Implements hook_field_attach_view_alter().
accessibility_reporting_field_attach_view_alter in sites/all/modules/ulmus/accessibility/modules/accessibility_reporting/accessibility_reporting.module
Implements hook_field_attach_view_alter().
display_cache_field_attach_view_alter in sites/all/modules/ulmus/display_cache/display_cache.module
Implements hook_field_attach_view_alter().
ds_extras_field_attach_view_alter in sites/all/modules/ulmus/ds/modules/ds_extras/ds_extras.module
Implements hook_field_attach_view_alter().
ds_field_attach_view_alter in sites/all/modules/ulmus/ds/ds.module
Implements hook_field_attach_view_alter().

... See full list


modules/field/field.api.php, line 1468


function hook_field_attach_view_alter(&$output, $context) {
  // Append RDF term mappings on displayed taxonomy links.
  foreach (element_children($output) as $field_name) {
    $element = &$output[$field_name];
    if ($element['#field_type'] == 'taxonomy_term_reference' && $element['#formatter'] == 'taxonomy_term_reference_link') {
      foreach ($element['#items'] as $delta => $item) {
        $term = $item['taxonomy_term'];
        if (!empty($term->rdf_mapping['rdftype'])) {
          $element[$delta]['#options']['attributes']['typeof'] = $term->rdf_mapping['rdftype'];
        if (!empty($term->rdf_mapping['name']['predicates'])) {
          $element[$delta]['#options']['attributes']['property'] = $term->rdf_mapping['name']['predicates'];



Error message

  • Warning: Cannot modify header information - headers already sent by (output started at /var/www/html/elmsln_community/ in drupal_send_headers() (line 1499 of /var/www/html/elmsln_community/
  • Error: Call to undefined function apc_delete() in DrupalAPCCache->clear() (line 289 of /var/www/html/elmsln_community/
The website encountered an unexpected error. Please try again later.