You are here

function menutrails_comment in Menu TrailsMenu Trails 5

Same name and namespace in other branches
  1. 6 menutrails.module \menutrails_comment()

This implements the same functionality as the nodeapi, but for comment urls.

File

./menutrails.module, line 84
Menutrails allows the assigment of "trails" which will keep menu items active for individual node views.

Code

function menutrails_comment($comment, $op) {
  if ($op == 'form' && arg(0) == 'comment') {
    $node = node_load($comment['nid']['#value']);
    $location = menutrails_node_location($node);
    $location[] = array(
      'path' => "comment/reply/{$node->nid}",
    );
    menu_set_location($location);
  }
}