继续Drupal分享精神 QQ群:107748121 站长QQ:2275288328 skype: hellodrupal【drupal交流+drupal 建站+theme制作】
登录 注册

Hook_nodeapi() 在drupal里的应用

好几天没有进行durpal了,今天来用一下hook_nodeapi(),按照我理解就是控制node类型的了。在官方的 解释:hook_nodeapi(&$node, $op, $a3 = NULL, $a4 = NULL), 我想在product类型内容页里面显示一个内容helloworld type !== 'product' || $teaser ) { break; } $node->content['product_form'] = array( '#value' => t('Hi,HelloWorld'), '#weight' => 10 ); break; } } ?> nodeapi官方说明的网址 http://api.drupal.org/api/function/hook_nodeapi。

评论

发表新评论

此内容将保密,不会被其他人看见。
  • 自动将网址与电子邮件地址转变为链接。
  • 自动断行和分段。
  • You can use BBCode tags in the text.
  • You may post code using <code>...</code> (generic) or <?php ... ?> (highlighted PHP) tags.

更多关於格式化选项的信息

CAPTCHA
This question is for testing whether you are a human visitor and to prevent automated spam submissions.
Image CAPTCHA
Enter the characters shown in the image.