How to redirect the page to custom path after creating new content in Drupal

function myfb_nodeapi(&$node, $op, $teaser = NULL, $page = NULL)
{
global $user;
$uid=$user->uid;
if ($node->type == 'type of your node') {
if ($op == 'insert') {
drupal_set_message(t('Some message for creating content'));
$path="new path";
drupal_goto($path);
}
}
}

No comments:

Post a Comment