1

I want to define section of items in administrative area, for my custom module operations.

I defined some items with hook_menu in /admin/config/development/ But i would like now to make a section, that will containt those menu items, so on click on that parent item i would be presented with those "contained" items.

It is like, when you have admin/, you click Configuration and you get to the screen with all the items contained ( admin/config/ ).

It is probably very simple, but somehow could not trample on it! Thanks!

1

What you are trying to achieve is really simple. You need not use any additional code. You just need to follow the correct menu structure. I've posted a sample code below

     function mymodule_menu() {
      $items['admin/config/development/mymodule'] = array(
      //Your code here
      );
     $items['admin/config/development/mymodule/sub-module-1'] = array(
      //Your code here
      );
     $items['admin/config/development/mymodule/sub-module-2'] = array(
      //Your code here
      );
      return $items;

} 

You need to clear the cache. Sometimes you might need to disable and re-enable your modules to register the menu. Now when you click mymodule menu item, a list of all your sub modules will be displayed.

  • I trust you :) I was trying the approach you propose before your posting, but somehow i did not get it right ... ill try again carefully, im sure in success! Thanks! – NenadP Oct 31 '12 at 15:31

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.