【发布时间】:2010-12-14 15:21:25
【问题描述】:
我已经构建了一个非节点模块,我希望将它与 Open Atrium 集成为一项功能。
我尝试了一项测试功能来尝试“破解”功能、空间和开放式中庭的代码,因为文档未涵盖此主题,而且我对功能、空间和开放式中庭不熟悉。
我使用特性创建了一个特性,然后自定义了信息和模块文件。
信息文件:
core = "6.x"
description = "A test feature"
name = "Test Feature"
package = "Features"
spaces[types][] = "og"
features[][] = ""code here
模块文件:
function test_feature_menu()
{
$items['ftest'] = array(
'title' => 'Test Feature',
'page callback' => 'test_feature_page',
'access callback' => 'spaces_menu_access',
'type' => MENU_NORMAL_ITEM,
'menu_name' => 'features'
);
}
function test_feature_page()
{
$output = 'test';
return $output;
}
该功能出现在功能部分,启用后,无论我在哪个组中,都会出现在功能菜单中。此外,这些组的功能设置为禁用,但该项目仍显示在菜单中。
有人能解释一下吗?
谢谢, 格雷格。
【问题讨论】:
标签: drupal-6 module drupal-modules open-atrium