开发者

Is it possible in drupal to delete a node without displaying the default drupal_set_message

开发者 https://www.devze.com 2023-01-14 19:08 出处:网络
I would like to be able to program开发者_开发百科matic-ally delete a node: node_delete(N); Without getting something like the following message when the page is refreshed:

I would like to be able to program开发者_开发百科matic-ally delete a node:

node_delete(N);

Without getting something like the following message when the page is refreshed:

Document Delivery Request Sather, Kinzer-Tevaris v. Smith, Death has been deleted

Is this possible?


If you call drupal_get_messages before the end of your script it will reset the messages queue.

Check out the documentation here.


For non-developers I created the Rules integrated "better messages" module, which adds the clean action. So if you want to do the same nicely, you can use the module.

Regards, Shushu

0

精彩评论

暂无评论...
验证码 换一张
取 消