Chris@0: /** Chris@0: * Implements hook_batch_alter(). Chris@0: */ Chris@0: function {{ machine_name }}_batch_alter(&$batch) { Chris@0: // If the current page request is inside the overlay, add ?render=overlay to Chris@0: // the success callback URL, so that it appears correctly within the overlay. Chris@0: if (overlay_get_mode() == 'child') { Chris@0: if (isset($batch['url_options']['query'])) { Chris@0: $batch['url_options']['query']['render'] = 'overlay'; Chris@0: } Chris@0: else { Chris@0: $batch['url_options']['query'] = array('render' => 'overlay'); Chris@0: } Chris@0: } Chris@0: }