summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEarl Miles2009-06-13 19:01:33 (GMT)
committer Earl Miles2009-06-13 19:01:33 (GMT)
commit01006f89635db194a1666c2f712895ee5cabc076 (patch)
tree3d6045e163dae1eb7b91fda809d539786783534c
parent43db47d4141bc6f852213722a2d6fc205a86f72a (diff)
#485486 by nrambeck: term view override was not setting breadcrumb like taxonomy/term is supposed to.
-rw-r--r--CHANGELOG.txt1
-rw-r--r--delegator/plugins/tasks/term_view.inc12
2 files changed, 13 insertions, 0 deletions
diff --git a/CHANGELOG.txt b/CHANGELOG.txt
index c0d21fb..254b1ee 100644
--- a/CHANGELOG.txt
+++ b/CHANGELOG.txt
@@ -11,6 +11,7 @@ Add a hook to allow other modules to cooperate a bit more easily with node page
#447064 by nickl: Improve requirements message when css cache directory cannot be created.
#481928: Needed indexes on delegator handlers and pages tables.
#484284 by crea: Add a node links content type to print just a node's links.
+#485486 by nrambeck: term view override was not setting breadcrumb like taxonomy/term is supposed to.
ctools 6.x-1.0-beta3
==================
diff --git a/delegator/plugins/tasks/term_view.inc b/delegator/plugins/tasks/term_view.inc
index 06dd976..a78120c 100644
--- a/delegator/plugins/tasks/term_view.inc
+++ b/delegator/plugins/tasks/term_view.inc
@@ -130,6 +130,18 @@ function delegator_term_view($terms, $depth = 0, $op = 'page') {
));
}
+ // Build breadcrumb based on first hierarchy of first term:
+ $term_args = taxonomy_terms_parse_string($terms);
+ $current->tid = $term_args['tids'][0];
+ $breadcrumb = array();
+ while ($parents = taxonomy_get_parents($current->tid)) {
+ $current = array_shift($parents);
+ $breadcrumb[] = l($current->name, 'taxonomy/term/'. $current->tid);
+ }
+ $breadcrumb[] = l(t('Home'), NULL);
+ $breadcrumb = array_reverse($breadcrumb);
+ drupal_set_breadcrumb($breadcrumb);
+
$output = ctools_context_handler_render($task, '', $contexts, array($terms, $depth, $op));
if ($output !== FALSE) {
return $output;