Download & Extend

Enable dependent modules automatically via the hook_enable of the parent module

Project:Enabled Modules
Version:6.x-1.x-dev
Component:Code
Category:support request
Priority:normal
Assigned:surferisback
Status:closed (fixed)

Issue Summary

I have a parent module with several sub-modules. When I enable the parent module, I would like to enable automatically the children.
For each module I would like to update my primary and secondary links menu with a menu link item of the parent module in a first level menu and the menu link items of children module in a second level menu.

example:

  • parent menu item
    • child1 menu item
    • child2 menu item
    • child3 menu item
    • ...

I manage to create the menu_item_link for the parent module with the menu_link_save function. But I don't manage to retrieve the mlid of the parent module to create the second level menu item of the children.

I tried to use the module_enable function in the hook_enable of the parent module to automatically enable the children module and to create the menu link but nothing happened.

I don't know if we can resolved my problem with the module and menu functions of the drupal API.

I hope that someone can help me.

Cheers

Comments

#1

Status:active» closed (fixed)

Given that this support request is over a year old, I hope noone minds if I close this.

@surferisback. I hope that you managed to solve it somehow. However, it probably isn't something that this module can help with.

nobody click here