You are here

function current_path in Redis 7.3

Same name and namespace in other branches
  1. 7.2 redis.path.inc \current_path()

Return the current URL path of the page being viewed.

Examples:

This function is not available in hook_boot() so use $_GET['q'] instead. However, be careful when doing that because in the case of Example #3 $_GET['q'] will contain "path/alias". If "node/306" is needed, calling drupal_bootstrap(DRUPAL_BOOTSTRAP_FULL) makes this function available.

Return value

The current Drupal URL path.

See also

request_path()

1 call to current_path()
drupal_cache_system_paths in ./redis.path.inc
Cache system paths for a page.

File

./redis.path.inc, line 356
Drupal default includes/path.inc file copy which only differs in:

Code

function current_path() {
  return $_GET['q'];
}