Also is there anywhere in the api doc that goes over all of the default $params array values?
Posting error message with redirect [solved]
Posting error message with redirect [solved]
Is it possible to post an error message as a param? I know you can use 'module_message' for a success message, is there a similar param for error? I am aware of ShowErrors but this doesn't work with a redirect, and then I would have to pass the error message as a param anways well writing logic to see if it is set in the action anyways.
Also is there anywhere in the api doc that goes over all of the default $params array values?

Also is there anywhere in the api doc that goes over all of the default $params array values?
Last edited by jeverd01 on Sun Apr 03, 2011 10:41 pm, edited 1 time in total.
- kidcardboard
- Forum Members

- Posts: 54
- Joined: Mon Sep 28, 2009 5:25 pm
Re: Posting error message with redirect
I've wondered this myself a few times (about the params anyways).
Re: Posting error message with redirect
ShowErrors works for me with a redirect..
..and in my defaultadmin:
It took me awhile to figure out that you had to 'echo' the ShowErrors() output.
Code: Select all
$params = array('tab_error'=> $this->Lang('errorupdatingdatabase'), 'active_tab' => 'articles');
$this->Redirect($id, 'defaultadmin', $returnid, $params);Code: Select all
if ($params['tab_error']) {
echo $this->ShowErrors($params['tab_error']);
}Re: Posting error message with redirect SOLVED
Awesome thanks for the help. Is there anywhere I can see all of the available params. I am still struggling with the documentation.
Re: Posting error message with redirect [solved]
I'm not sure what you mean by 'all the available params'. The only 'special' parameter that I know is 'tab_message'
-
Duketown
Re: Posting error message with redirect [solved]
Thanks Wishbone for sharing this. Saved me hours to get it good.
Duketown
Duketown
