function getdirections_locations_path in Get Directions 7.2
Same name and namespace in other branches
- 6.2 getdirections.api.inc \getdirections_locations_path()
- 6 getdirections.api.inc \getdirections_locations_path()
- 7.3 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($fromnid, $tonid); $url = l(t('Get directions'), $path);
Parameters
int $fromnid: Required. The nid of the location node of the starting point
int $tonid: Required. The nid of the location node of the destination
Return value
Returns a path relative to the drupal root.
File
- ./
getdirections.api.inc, line 62 - Get directions API
Code
function getdirections_locations_path($fromnid, $tonid) {
if (getdirections_get_current_supported_module() && is_numeric($fromnid) && is_numeric($tonid)) {
return "getdirections/locations/{$fromnid}/{$tonid}";
}
}