1

I want to be able to change the node edit link from node/[nid]/edit to my_custom_module/[nid] for just one content type. Which hook sould I implement?

I need this change to be applied to all the node edit links present on the frontend and backend of the site.

I tried implementing hook_menu_link_alter but this hook does not provide me any node-related data so I can not apply the link changes just to one content type.

1

You can use hook_node_prepare, Please check the below code which can help you to sort out your problem.

function hook_node_prepare($node) {
if($node->type == "somecontent type"){
    drupal_goto("/somepath..");
}

}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.