3

I want to remove the Modules Tab (module list and sub-module list) from my custom module.

I have tried some solutions but in vain. e-g:

options['show_header'] = false; 

It removes all header but I want to remove Logo and Global Links.

Disable all modules and change "tab=>false" in manifest.php file of custom module.

Star
  • 3,222
  • 5
  • 32
  • 48
Awais Dar
  • 120
  • 1
  • 10

1 Answers1

3

There's not an official way to do this through the configuration or anything, but you could use a custom logic hook for this to inject some javascript to hide the module list.

Say your custom module is abc_CustomModule, create a logic_hooks.php or add to it if it doesn't exist custom/modules/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'); 

At the end of each page load for your custom module, it'll run the following code in custom/modules/abc_CustomModule/abc_CustomModule_custom.php

<?php

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

This simply outputs some javascript that will hide the div that contains the modules.

Star
  • 3,222
  • 5
  • 32
  • 48
Chad Hutchins
  • 474
  • 3
  • 9
  • 2
    i was also looking to manage some other Div Tags in custom module like somewhere showing Actions only and somewhere hide them and show Recently Viewed. This will fix those problems too. Thanks.. – Awais Dar Aug 31 '13 at 06:56