The Mainmenu

By default the front controller places the main menu (/inc/handler_mainmenu.inc) containing the list of available and active modules on the page, however this functionality can be overridden by a hook called shn_<modulename>_mainmenu() in the main.inc file of the module. see module_convention for how the module system works.

Creating the mainmenu in a module

the library /inc/lib_menu.inc will help generate a menu for a module. Assuming your module name is mpr the following code is a typical example of overriding the mainmenu and generating the module menu using the template handler in the lib_menu.inc.

function shn_mpr_mainmenu()
{
    global $global;
    $module = $global['module'];

    // Create the module menu
    shn_mod_menuopen("Missing Person Registry");

    shn_mod_menuitem("default","Home");
    shn_mod_menuitem("addmp","Report a Missing Person");
    shn_mod_menuitem("fndmp","Report a Found Person");
    shn_mod_menuitem("search","Search for a Person");
    shn_mod_menuitem("stats","Statistics");

    shn_mod_menuclose();

    // include the main menu
    include $global['approot']."/inc/handler_mainmenu.inc";
}

Main Menu Module Order

The following is the existing order of the modules in trunk as at 20091117.

  • 20 - Administration (admin)
  • 21 - Camp Management System (cms)
  • 04 - Shelter Registry (cr)
  • 16 - Aid Catalog cs)
  • undefined - Disease Surveillance (dsm)
  • 04 - Disaster Victim Registry (dvr)
  • 03 - GPS Interface (gps)
  • 01 - Home (home)
  • 04 - Housing Registry (hr)
  • 06 - Inventory Management (ims)
  • 04 - Image Tagger (itag)
  • 03 - Missing Person Registry (mpr)
  • 05 - MapServer Configuration (ms)
  • 02 - Messaging/Alerting (msg)
  • 04 - Organisation Registry (or)
  • 04 - Press and Media (pnm)
  • 02 - Disaster Preparedness (pre)
  • 19 - User Preferences (pref)
  • 04 - Resources (rez)
  • 04 - Request/Aid Management (rms)
  • 19 - Reporting System (rs)
  • 21 - Skeleton (skel)
  • 02 - Situation Awareness (sm)
  • undefined - Social Network (sn)
  • undefined - Snapshot (snap)
  • 01 - Situation Report (sr)
  • 19 - Synchronisation (sync)
  • 00 - Volunteer Management (vm)
  • undefined - Volunteer Coordination (vol)
  • 04 - Web Services (ws)
  • 22 - Streaming Module (xst)

Proposed New Module Menu Numbering Hierarchy

This new module numbering hierarchy is designed to produce a hierarchical menu order that uses major numbers to cluster modules together. Initially the clustering is proposed to be around mature modules, development modules, and admin/server functions. There is plenty of space left for more modules to be developed.

  • 0001 Home
  • 1000 Mature Modules
    • 1010 Aid Catalog
    • 1020 Camp Management System
    • 1030 Disaster Victim Registry
    • 1040 Messaging/Alerting
    • 1050 Missing Person Registry
    • 1060 Organisation Registry
    • 1070 Request/Aid Management
    • 1080 Situation Awareness
    • 1090 Shelter Registry
    • 1100 Volunteer Management
  • 2000 Development Modules
    • 2010 Disaster Preparedness
    • 2020 GPS Interface
    • 2030 Housing Registry
    • 2040 Image Tagger
    • 2050 Inventory Management
    • 2060 Press and Media
    • 2070 Reporting System
    • 2080 Resources
    • 2090 Situation Report
    • 2100 Social Network
    • 2110 Volunteer Coordination
    • 2990 Skeleton
  • 3000 Admin/Server Modules
    • 3010 Administration
    • 3020 MapServer Configuration
    • 3030 Snapshot
    • 3040 Streaming
    • 3050 Synchronisation
    • 3060 User Preferences
    • 3070 Web Services

Navigation
  • Navigate