function drupal_get_destination


Error message

User warning: The following module is missing from the file system: theme/theme. For information about how to fix this, see the documentation page. in _drupal_trigger_error_with_delayed_logging() (line 1156 of /var/www/html/elmsln_community/
cis7 drupal_get_destination()
cle7 drupal_get_destination()
elmsmedia7 drupal_get_destination()
icor7 drupal_get_destination()
meedjum_blog7 drupal_get_destination()
mooc7 drupal_get_destination()

Prepares a 'destination' URL query parameter for use with drupal_goto().

Used to direct the user back to the referring page after completing a form. By default the current URL is returned. If a destination exists in the previous request, that destination is returned. As such, a destination can persist across multiple pages.

Return value

An associative array containing the key:

  • destination: The path provided via the destination query string or, if not available, the current path.

See also



Related topics

105 calls to drupal_get_destination()
admin_menu_links_icon in sites/all/modules/ulmus/admin_menu/
Build icon menu links; mostly containing maintenance helpers.
admin_menu_page_build in sites/all/modules/ulmus/admin_menu/admin_menu.module
Implements hook_page_build().
aurora_form_system_theme_settings_alter in sites/all/themes/ulmus/aurora/theme-settings.php
Implements hook_form_system_theme_settings_alter() function.
bakery_translated_menu_link_alter in sites/all/modules/ulmus/bakery/bakery.module
Implements hook_translated_menu_link_alter().
boxes_block_view in sites/all/modules/ulmus/boxes/boxes.module
Implements hook_block_view().

... See full list

1 string reference to 'drupal_get_destination'
views_ajax in sites/all/modules/ulmus/views/includes/
Menu callback to load a view via AJAX.


includes/, line 525
Common functions that many Drupal modules will need to reference.


function drupal_get_destination() {
  $destination = &drupal_static(__FUNCTION__);

  if (isset($destination)) {
    return $destination;

  if (isset($_GET['destination'])) {
    $destination = array('destination' => $_GET['destination']);
  else {
    $path = $_GET['q'];
    $query = drupal_http_build_query(drupal_get_query_parameters());
    if ($query != '') {
      $path .= '?' . $query;
    $destination = array('destination' => $path);
  return $destination;