开发者

how to catch the general node/add form?

开发者 https://www.devze.com 2023-03-16 18:18 出处:网络
I have a custom module and want to catch node/add , but inside form hook_nodeapi() it doesn\'t show up.

I have a custom module and want to catch node/add , but inside form hook_nodeapi() it doesn't show up.

I need this, to restrict access t开发者_高级运维o the general node creation overview form. Setting the rights is no solution for me, because my users need the right "create content"


Take a look at hook_form_alter. It should be able to do what you're looking for.


Drupal node module already provides the permissions for each content type so you can define permissions in admin/user/permissions page. Alternatively you can define your own permission using hook_perm in your custom module and use that permissions in your custom module.

0

精彩评论

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