Page 1 of 1

Re: Module Development: Possible to display a message on next page?

Posted: Wed Dec 12, 2007 4:16 am
by calguy1000
Well.... there are some functions, like 'ShowMessage()' and 'ShowErrors()' that are useful for displaying semi-standardized messages in actions..... you just have to supply the text for them.

Here's what I normally do:

a) When calling Redirect($id,'defaultadmin',$returnid,$parms)  I set a message into the parms array.

i.e:

Code: Select all

$parms = array();
$parms['message'] = $this->Lang('blah');
$this->Redirect($id,'defaultadmin',$returnid,$parms);
Then in the defaultadmin action...

Code: Select all

if( isset($params['message']) )
{
  echo $this->ShowMessage($params['message']);
}

Re: Module Development: Possible to display a message on next page?

Posted: Mon Jan 14, 2008 11:19 pm
by calguy1000
The params are supplied as an argument to the DoAction method. and don't exist before that.

I've setup something similar in CGExtensions, take a look at that (from svn)