| API | Package | Subpackage | Class | Method | Reference | Last reviewed | Doc status |
|---|---|---|---|---|---|---|---|
Home |
Joomla.Framework |
Application |
JController |
setMessage |
setMessage() |
Never | Work in Progress |
Sets the internal message that is passed with a redirect.
This method is displayed at the top of the target page.
void setMessage ( $text )
| $text | string | is a string containing the message that is to be displayed. |
Example
if (JRequest::getVar( 'testvalue' ) != 1) { $controller->setRedirect( 'index.php?option=com_weblinks&testvalue=1&view=weblinks' ); $controller->setMessage( 'This is the redirect message!' ); $controller->redirect(); }
will result in the browser being redirected and the specified message being displayed at the top of the target page.