How I can change path from /comment/reply/11#comment-form to /node/$node->nid/#comment-form in node $links?
In Drupal 7, you can add something like this to your template.php:
function yourtheme_preprocess_comment(&$vars) {
// Update 'reply' link to make it go to the comment form page anchor instead of some weird comment post page
if (isset($vars['content']['links']['comment']['#links']['comment-reply'])) {
$vars['content']['links']['comment']['#links']['comment-reply']['href'] = url('node/' . $vars['node']->nid, array('fragment' => 'comment-form', 'absolute' => TRUE));
}
}
I'm guessing this is a Drupal 6 issue:
The Comment module create the links with hook_links(). You can alter those in a custom module using hook_links_alter().
/node/nid/#comment-form
instead of/comment/reply/cid#comment-form
? I don't think just changing the path in the link is going to still get you to the comment form. – Chaulky Mar 14 '11 at 2:14