You are here

function comment_CrumbsMonoPlugin_comment::findParent__comment_x in Crumbs, the Breadcrumbs suite 7.2

Same name and namespace in other branches
  1. 7 plugins/crumbs.comment.inc \comment_CrumbsMonoPlugin_comment::findParent__comment_x()

Make node/% the parent for comment/%. This also completes the breadcrumb for other comment/%/* paths.

Parameters

string $path:

array $item:

Return value

string

File

plugins/crumbs.comment.inc, line 57

Class

comment_CrumbsMonoPlugin_comment

Code

function findParent__comment_x($path, $item) {
  $comment = comment_load($item['original_map'][1]);
  if (!empty($comment->nid)) {
    return 'node/' . $comment->nid;
  }
  return NULL;
}