drupal_get_normal_path

5 path.inc drupal_get_normal_path($path)
6 path.inc drupal_get_normal_path($path, $path_language = '')
7 path.inc drupal_get_normal_path($path, $path_language = NULL)
8 path.inc drupal_get_normal_path($path, $langcode = NULL)

Given a path alias, return the internal path it represents.

Parameters

$path: A Drupal path alias.

$path_language: An optional language code to look up the path in.

Return value

The internal path represented by the alias, or the original alias if no internal path was found.

9 calls to drupal_get_normal_path()

File

includes/path.inc, line 128
Functions to handle paths in Drupal, including path aliasing.

Code

function drupal_get_normal_path($path, $path_language = '') {
  $result = $path;
  if ($src = drupal_lookup_path('source', $path, $path_language)) {
    $result = $src;
  }
  if (function_exists('custom_url_rewrite_inbound')) {
    // Modules may alter the inbound request path by reference.
    custom_url_rewrite_inbound($result, $path, $path_language);
  }
  return $result;
}

Comments

Complements

The complementary function is drupal_get_path_alias().

Login or register to post comments