references:joomla.framework:application:jcontroller-setredirectTable of Contents
setRedirect
Sets a URL for browser redirection. A message and message type can optionally be specified. The message is displayed on the target page, and the message type determines which icon is displayed with the message. Syntaxvoid setRedirect ( $url, $msg, $type )
ExamplesExample 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. |


