summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
Diffstat (limited to 'modules')
-rw-r--r--modules/blog/blog.module5
-rw-r--r--modules/comment/comment.module3
-rw-r--r--modules/forum/forum.module21
-rw-r--r--modules/taxonomy/taxonomy.pages.inc9
4 files changed, 15 insertions, 23 deletions
diff --git a/modules/blog/blog.module b/modules/blog/blog.module
index e43a80435..564261177 100644
--- a/modules/blog/blog.module
+++ b/modules/blog/blog.module
@@ -107,10 +107,7 @@ function blog_form(&$node) {
function blog_view($node, $teaser = FALSE, $page = FALSE) {
if ($page) {
// Breadcrumb navigation
- $breadcrumb[] = array('path' => 'blog', 'title' => t('Blogs'));
- $breadcrumb[] = array('path' => 'blog/'. $node->uid, 'title' => t("@name's blog", array('@name' => $node->name)));
- $breadcrumb[] = array('path' => 'node/'. $node->nid);
- menu_set_location($breadcrumb);
+ drupal_set_breadcrumb(array(l(t('Home'), NULL), l(t('Blogs'), 'blog'), l(t("@name's blog", array('@name' => $node->name)), 'blog/'. $node->uid)));
}
return node_prepare($node, $teaser);
}
diff --git a/modules/comment/comment.module b/modules/comment/comment.module
index 86b874130..877be28ae 100644
--- a/modules/comment/comment.module
+++ b/modules/comment/comment.module
@@ -681,8 +681,7 @@ function comment_edit($cid) {
*/
function comment_reply($node, $pid = NULL) {
// Set the breadcrumb trail.
- menu_set_location(array(array('path' => "node/$node->nid", 'title' => $node->title), array('path' => "comment/reply/$node->nid")));
-
+ drupal_set_breadcrumb(array(l(t('Home'), NULL), l($node->title, 'node/'. $node->nid)));
$op = isset($_POST['op']) ? $_POST['op'] : '';
$output = '';
diff --git a/modules/forum/forum.module b/modules/forum/forum.module
index 600ae5a46..e7b3bb683 100644
--- a/modules/forum/forum.module
+++ b/modules/forum/forum.module
@@ -184,16 +184,15 @@ function forum_nodeapi(&$node, $op, $teaser, $page) {
}
}
// Breadcrumb navigation
- $breadcrumb = array();
- $breadcrumb[] = array('path' => 'forum', 'title' => $vocabulary->name);
+ $breadcrumb[] = l(t('Home'), NULL);
+ $breadcrumb[] = l($vocabulary->name, 'forum');
if ($parents = taxonomy_get_parents_all($node->tid)) {
$parents = array_reverse($parents);
foreach ($parents as $p) {
- $breadcrumb[] = array('path' => 'forum/'. $p->tid, 'title' => $p->name);
+ $breadcrumb[] = l($p->name, 'forum/'.$p->tid);
}
}
- $breadcrumb[] = array('path' => 'node/'. $node->nid);
- menu_set_location($breadcrumb);
+ drupal_set_breadcrumb($breadcrumb);
if (!$teaser) {
$node->content['forum_navigation'] = array(
@@ -628,11 +627,10 @@ function template_preprocess_forums(&$variables) {
$title = !empty($vocabulary->name) ? $vocabulary->name : '';
// Breadcrumb navigation:
- $breadcrumb = array();
+ $breadcrumb[] = l(t('Home'), NULL);
if ($variables['tid']) {
- $breadcrumb[] = array('path' => 'forum', 'title' => $title);
+ $breadcrumb[] = l($vocabulary->name, 'forum');
}
-
if ($variables['parents']) {
$variables['parents'] = array_reverse($variables['parents']);
foreach ($variables['parents'] as $p) {
@@ -640,16 +638,13 @@ function template_preprocess_forums(&$variables) {
$title = $p->name;
}
else {
- $breadcrumb[] = array('path' => 'forum/'. $p->tid, 'title' => $p->name);
+ $breadcrumb[] = l($p->name, 'forum/'. $p->tid);
}
}
}
-
+ drupal_set_breadcrumb($breadcrumb);
drupal_set_title(check_plain($title));
- $breadcrumb[] = array('path' => $_GET['q']);
- menu_set_location($breadcrumb);
-
if ($variables['forums_defined'] = count($variables['forums']) || count($variables['parents'])) {
// Format the "post new content" links listing.
$forum_types = array();
diff --git a/modules/taxonomy/taxonomy.pages.inc b/modules/taxonomy/taxonomy.pages.inc
index 5ff9cff48..4f86441e9 100644
--- a/modules/taxonomy/taxonomy.pages.inc
+++ b/modules/taxonomy/taxonomy.pages.inc
@@ -32,13 +32,14 @@ function taxonomy_term_page($str_tids = '', $depth = 0, $op = 'page') {
case 'page':
// Build breadcrumb based on first hierarchy of first term:
$current->tid = $tids[0];
- $breadcrumbs = array(array('path' => $_GET['q'], 'title' => $names[0]));
+ $breadcrumb = array();
while ($parents = taxonomy_get_parents($current->tid)) {
$current = array_shift($parents);
- $breadcrumbs[] = array('path' => 'taxonomy/term/'. $current->tid, 'title' => $current->name);
+ $breadcrumb[] = l($current->name, 'taxonomy/term/'. $current->tid);
}
- $breadcrumbs = array_reverse($breadcrumbs);
- menu_set_location($breadcrumbs);
+ $breadcrumb[] = l(t('Home'), NULL);
+ $breadcrumb = array_reverse($breadcrumb);
+ drupal_set_breadcrumb($breadcrumb);
$output = taxonomy_render_nodes(taxonomy_select_nodes($tids, $terms['operator'], $depth, TRUE));
drupal_add_feed(url('taxonomy/term/'. $str_tids .'/'. $depth .'/feed'), 'RSS - '. $title);