You are here

function getdirections_locations_path in Get Directions 6

Same name and namespace in other branches
  1. 6.2 getdirections.api.inc \getdirections_locations_path()
  2. 7.3 getdirections.api.inc \getdirections_locations_path()
  3. 7.2 getdirections.api.inc \getdirections_locations_path()

API Function to generate a url path for use by other modules/themes.

Example Usage: $path = getdirections_locations_path($fromvid, $tovid); $url = l(t('Get directions'), $path);

Parameters

$fromvid: Required. The vid of the location node of the starting point

$tovid: Required. The vid of the location node of the destination

Return value

Returns a path relative to the drupal root.

File

./getdirections.api.inc, line 65
Get directions API

Code

function getdirections_locations_path($fromvid, $tovid) {
  if (module_exists('location') && is_numeric($fromvid) && is_numeric($tovid)) {
    return "getdirections/locations/{$fromvid}/{$tovid}";
  }
}