在SugarCRM的自定义模块删除模块列表

问题描述 投票:3回答:1

我想从我的自定义模块,删除模块选项卡(模块列表和子模块列表)。

我已经尝试了一些解决方案,但徒劳无功。例如:

options['show_header'] = false; 

它消除了所有的头,但我想删除标志,全球联系等。

禁用所有模块和自定义模块的"tab=>false"文件更改manifest.php

sugarcrm suitecrm
1个回答
3
投票

有没有通过配置或任何这样做的正式方法,但你可以使用自定义逻辑钩为此注入一些JavaScript来隐藏模块列表。

说你的自定义模块是abc_CustomModule,创建一个logic_hooks.php或添加到它,如果不存在自定义/模块它/ abc_CustomModule / logic_hooks.php

<?php

$hook_version = 1; 
$hook_array = Array(); 
$hook_array['after_ui_frame'] = Array(); 
$hook_array['after_ui_frame'][] = Array(1, 'Hide Modules', 'custom/modules/abc_CustomModule/abc_CustomModule_custom.php','abc_CustomModule_custom', 'hide_modules'); 

在您的自定义模块,每个页面加载结束时,它会运行在自定义/模块下面的代码/ abc_CustomModule / abc_CustomModule_custom.php

<?php

class abc_CustomModule_custom
{
    function hide_modules($bean, $event)
    {
        echo "<script>$('#ajaxHeader').hide()</script>";
    }
}

这只是输出一些JavaScript,将隐藏包含模块股利。

© www.soinside.com 2019 - 2024. All rights reserved.