You are here

function hook_domain_path in Domain Access 7.3

Allows modules to alter path when rewriting URLs.

This hook will fire for all paths and may be resource-intensive. Look at Domain Prefix for best practices implementation. In Domain Prefix, we only include this function if we know it is necessary.

Parameters

$domain_id: The domain_id taken from {domain}.

$path: The internal drupal path to the node.

$options: The path options.

$original_path: The raw path request from the URL.

See also

hook_url_outbound_alter()

Related topics

1 invocation of hook_domain_path()
_domain_path_modules in ./domain.module
Helper function for domain_path() checks.

File

./domain.api.php, line 638
API documentation file.

Code

function hook_domain_path($domain_id, &$path, &$options, $original_path) {

  // Give a normal path alias
  $path = drupal_get_path_alias($path);

  // In D7, path alias lookups are done after url_alter, so if the
  // alias is set, the option must be flagged.
  $options['alias'] = TRUE;
}