Creating_multiple_menus_for_a_plugin - e107inc/e107v1 GitHub Wiki


title: Creating multiple menus for a plugin permalink: /Creating_multiple_menus_for_a_plugin/

Warning: This information might be outdated. See http://wiki.e107.org/index.php?title=Writing_A_Plugin#myplugin_menu.php for more up-to-date information.

The latest version of e107 allows you to have a multiple menus for a plugin. Previously the directory had to end in _menu and the menu file has to have the exact same name, which is no longer the case.

Any plugin can now have as many menus as the plugin author would like. The plugin directory name does not have to end in _menu, but the individual menu files must.

If you want to create configuration files for the menu, you can do that two different ways.

    1. If you only have one menu, you can create just a config.php file and it will be detected (this was for backward compatibility):
    • menu file = 'e107_plugins/mymenu/menu1_menu.php'
    • config file = 'e107_plugins/mymenu/config.php'
    1. If you have more than one menu, you must add .config to the filename.
    • menu file1 = 'e107_plugins/mymenu/menu1_menu.php'
    • menu file2 = 'e107_plugins/mymenu/menu2_menu.php'
    • config file1 = 'e107_plugins/mymenu/menu1_menu.config.php'
    • config file2 = 'e107_plugins/mymenu/menu2_menu.config.php'

Category:PluginWriting

⚠️ **GitHub.com Fallback** ⚠️