Differences

This shows you the differences between two versions of the page.

dev:breadcrumbs [2006/09/04 10:31]
editor created
dev:breadcrumbs [2009/07/06 20:36] (current)
Line 1: Line 1:
 +A bread crumb trail has been added to Sahana to give a history of where the user has been. This will also help users jump between modules without losing context.
 +The breadcrumb appears in the top of the page in the following form:
 +
 +  Shelter Registry:Edit Camp > Request/Aid Management:Home > New Pledge >
 +
 +Nothing new needs to be done in the modules to enable breadcrumbs as the breadcrumb library automatically picks up the names of the pages it has been to from the navigation bar and is put to the global variable as follows:
 +
 +  $global['shn_q_<query_string>_nicename'] = "The nice name for this action";
 +
 +e.g.
 + 
 +  $global['shn_q_mod=mpr&act=search&type=missing_nicename'] = "Search for a missing person";
 +
 +or use the following helper function
 +
 +  shn_breadcrumb_set_nicename("mpr","search", "Search for a Missing Person");
 +
 +where <module> = the module directory name
 +and <action> = the action abbreviation
 +
 +e.g.
 +
 +  $global['shn_cr_addcamp_nicename'] = "Add a Camp";
 +
 +A breadcrumb will only appear if the nicename is given for that action. Most of the nicenames are automatically picked up from the navigation bar associated to the action, provided you use the functions in /inc/lib_menu.inc to display you module menu items (this is the convention used in all modules).
 +
 +If the module writer wishes for actions beyond what appears in the navigation bar to be tracked, all he needs to do is declare the nicename as given above in the $global variable.

Navigation
  • Navigate