Redirect "edit" tab on single node view I created custom node edit pages and I want the edit tab to redirect from 

node/2545/edit

to

topic/2545/edit

or 

node/2549/edit

to

arts/2545/edit

depending on the content type

This is not an alias this is a custom edit page/view I created, it is NOT the node edit page or an alias of it. it is a completely separate page and I simply want to redirect to this page when I click edit. In other words "I want to redirect to a completely random page when I click "edit"


  


http://screencast.com/t/zHcFsr8I
(Disclaimer: This is not tested, it's been a while since I did a D6 site...)

First, I would implement hook_menu_alter and clone the node/%node/edit item into topic/%node/edit and arts/%node/edit. (If you want to use custom page callbacks for the forms, that's fine. You can make all changes you need to the menu items.) At least, you must change the access callback property and set it to the function name of your custom access callback (see below). Now you have three similar menu items with three different URL's. All of these should be visible as tabs on all nodes, so we're not done yet.

Second, I would create a custom access callback to hide the tabs with the incorrect URL's. This is described in HowTo: Add / Remove a menu_local_task for specific node types. In your case, the access callback should check the type of node on the current page and use it to decide if the tab must be shown or not. Don't forget to also call node_access(), because if the user is not allowed to edit that node, the tab must be hidden too.

Sorry I don't have actual code to share, I hope this helps.