Skip to main content
2 of 2
replaced http://expressionengine.stackexchange.com/ with https://expressionengine.stackexchange.com/

Brandon is correct - EE does not like a hash in a redirect URL.

Instead, try using flash data for this.

$this->EE->session->set_flashdata('selected-tab', 'settings');
$this->EE->functions->redirect(BASE . AMP . 'C=addons_modules' . AMP . 'M=show_module_cp' . AMP . 'module=module_name_here');

Then, in your module code:

if($tab = ee()->session->flashdata('selected-tab') && $tab == 'settings')
{
    // Add something here to your markup so that your JS will select the tab you want
}
Derek Hogue
  • 17.4k
  • 2
  • 27
  • 42