It is possible to create a module which add items to two different menus?

Hello, all.

We are creating some modules for FreePBX. One of them should both allow the user to register some content in some tables and to generate reports based on info from queue_log and the registered content. We would prefer to add the link to the registration screen in the “Admin” menu, while adding the link to the report part in the Reports menu. Is it possible? It would be ok to create two modules packed in one archive, too.

Thanks in advance!

you can create as many menu items as you would like.

Have a look at core as an example which creates several.

Look at the module.xml file, and you will see the menuitems tag which creates the menu items that correspond to the page.menuitemname.php file. You can see examples where different menu items are placed under different tabs in that example.

You are completely right! One just can add a “category” attribute to the icon-defining tags. For example, here are the definitions of the cited core function:

<menuitems> <extensions needsenginedb="yes">Extensions</extensions> <users needsenginedb="yes">Users</users> <devices needsenginedb="yes">Devices</devices> <did category="Connectivity">Inbound Routes</did> <zapchandids category="Connectivity">Zap Channel DIDs</zapchandids> <routing category="Connectivity">Outbound Routes</routing> <trunks category="Connectivity">Trunks</trunks> <general category="Settings">General Settings</general> <advancedsettings category="Settings">Advanced Settings</advancedsettings> <ampusers category="Admin">Administrators</ampusers> </menuitems>

How are you then planning to distribute your custom module ?
Is there a way to add a custom or private repository and use “Module Admin” module to enable-disable a custom module ?

The online repository is controlled by the project.

All of the supported and mostly supported “unsupported” modules are available online hosted on FreePBX.

There are commercial modules that the project is willing to support and put online which we can be contacted concerning how to get them there and in the app store if they are for purchase.

Beyond that, Module Admin will detect any module that is present in the module directory and needs installing, or can upload any properly packaged module and install it. They do not have to be online.

Thanks for clarifying this Module Detection feature.