虽然提交的Drupal故事的形式默认重定向URLDrupal的6故事的形式提交URL变化
http://localhost/drupal/?q=node/20
我需要改变成
http://localhost/drupal_new/xyz.php?q=node/20
虽然提交的Drupal故事的形式默认重定向URLDrupal的6故事的形式提交URL变化
http://localhost/drupal/?q=node/20
我需要改变成
http://localhost/drupal_new/xyz.php?q=node/20
如果您创建一个新的模块,您可以添加hook_form_alter的实现来检查所有形式和改变提交相应的表格(S)
/*
Implementation of hook_form_alter this method hooks into the submission of story forms
and redirects appropriately
*/
function my_redirect_module_form_alter(&$form, &$form_state, $form_id) {
//some code to filter the forms
if(!$form['#node']->type=='story') {return;}
//otherwise this is a for we want to fangle
$form_state['redirect'][0]='http://localhost/drupal_new/xyz.php';
//this should leave all the ?q=node/xx untouched in $form_State['redirect'][1]
}
代码从存储器中写了这么YMMV对重定向...
看起来你需要实现自定义模块进行重定向。
看看这个页面:http://drupal.org/node/134000,特别是“如何覆盖默认表单重定向”部分。它讨论了使用hook_form_alter()函数进行重定向。