diff options
author | webchick <webchick@24967.no-reply.drupal.org> | 2012-09-30 20:37:55 -0400 |
---|---|---|
committer | webchick <webchick@24967.no-reply.drupal.org> | 2012-09-30 20:37:55 -0400 |
commit | 13f16ae3423087824118e1e5c07f88396a85c8f7 (patch) | |
tree | 7a9678d7256d44fdcd4d5580a548ffca98aa7459 /modules/taxonomy | |
parent | c3cba0532ba45692af5378d1b89e745ea0df3701 (diff) | |
download | brdo-13f16ae3423087824118e1e5c07f88396a85c8f7.tar.gz brdo-13f16ae3423087824118e1e5c07f88396a85c8f7.tar.bz2 |
Issue #1154382 by Berdir, barraponto, acouch, swentel, LoMo, DamienMcKenna, chx: Fixed View mode no longer can be changed.
Diffstat (limited to 'modules/taxonomy')
-rw-r--r-- | modules/taxonomy/taxonomy.module | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/modules/taxonomy/taxonomy.module b/modules/taxonomy/taxonomy.module index 7814410c3..07d01d399 100644 --- a/modules/taxonomy/taxonomy.module +++ b/modules/taxonomy/taxonomy.module @@ -761,6 +761,14 @@ function taxonomy_term_view($term, $view_mode = 'full', $langcode = NULL) { $langcode = $GLOBALS['language_content']->language; } + // Allow modules to change the view mode. + $context = array( + 'entity_type' => 'taxonomy_term', + 'entity' => $term, + 'langcode' => $langcode, + ); + drupal_alter('entity_view_mode', $view_mode, $context); + field_attach_prepare_view('taxonomy_term', array($term->tid => $term), $view_mode, $langcode); entity_prepare_view('taxonomy_term', array($term->tid => $term), $langcode); |