Creating multiple menus for a plugin

From e107 Wiki
Jump to: navigation, search

e107 Wiki: English | Русский | Deutsch | Français | Magyar | Português | Български | Česky | Nederlands | Ελληνικά | Italiano | Norske | Polska | Slovenščina | Español | Svenska | Translate: Wiki | Page


Current Release 1.0.4 | | Download | Changelog | Forum | Plugins | Themes | RSS Feed of Latest Changes | Atom Feed of Latest Changes

How to write a plugin
Main page > I : First Aid > II : Development > III : Administration > IV : How To's > V : Plugin Writing > VI : Theming & Shortcodes

Warning: This information might be outdated. See 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'
  • 2. 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'