function drupal_get_path_alias
7.x path.inc | drupal_get_path_alias($path = NULL, $path_language = NULL) |
6.x path.inc | drupal_get_path_alias($path, $path_language = '') |
Given an internal Drupal path, return the alias set by the administrator.
Parameters
$path: An internal Drupal path.
$path_language: An optional language code to look up the path in.
Return value
An aliased path if one was found, or the original path if no alias was found.
4 calls to drupal_get_path_alias()
- block_list in drupal-6.x/
modules/ block/ block.module - Return all blocks in the specified region for the current user.
- path_nodeapi in drupal-6.x/
modules/ path/ path.module - Implementation of hook_nodeapi().
- url in drupal-6.x/
includes/ common.inc - Generates an internal or external URL.
- _statistics_link in drupal-6.x/
modules/ statistics/ statistics.module - It is possible to adjust the width of columns generated by the statistics module.
File
- drupal-6.x/
includes/ path.inc, line 108 - Functions to handle paths in Drupal, including path aliasing.
Code
function drupal_get_path_alias($path, $path_language = '') {
$result = $path;
if ($alias = drupal_lookup_path('alias', $path, $path_language)) {
$result = $alias;
}
return $result;
}