From 13f16ae3423087824118e1e5c07f88396a85c8f7 Mon Sep 17 00:00:00 2001 From: webchick Date: Sun, 30 Sep 2012 20:37:55 -0400 Subject: Issue #1154382 by Berdir, barraponto, acouch, swentel, LoMo, DamienMcKenna, chx: Fixed View mode no longer can be changed. --- modules/taxonomy/taxonomy.module | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'modules/taxonomy') 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); -- cgit v1.2.3