1

After saving an extension's settings, EE by default redirects you to the Extensions landing page. I want to keep the user in the extension settings after saving but also use EE's flashdata.

The below code is in my save_settings method.

$this->EE->session->set_flashdata('message_success', $this->EE->lang->line('preferences_updated'));
$this->EE->functions->redirect(BASE.AMP.'C=addons_extensions'.AMP.'M=extension_settings'.AMP.'file=my_custom_extension');

Does anyone know why set_flashdata does not seem to work after the redirect where in Module settings this does?

I've also looked into this help request: displaying a flash message after redirect

1
  • Shot in the dark - try an exit() after your redirect? Feb 13 '13 at 13:16
1

To do that you'll have to, I think, create the custom settings form for the extension. Once you have that, you'll also have to run custom processing so you'll have complete control of the redirect. Take a look at the extension docs for details. For a complete example, take a look at the EE Debug Toolbar settings code.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.