|
Written by Mike Reumer
|
|
Friday, 29 October 2010 19:35 |
|
The include plugin adds the origin of the refer page to the url for the component. This way the component knows what page called the article where the component is included.
In the component you can capture this origin and use it for a redirection. For example:
if( this->error() ) { $origin = base64_decode( JRequest::getVar( 'origin' ) ); // clean origin up a bit to grab only the path & query $origin = JUri::getPath( $origin ).'?'.JUri::getQuery( $origin ); $this->setRedirect( $origin ); }
Thanks to Hugo Jackson
|
|
Last Updated on Friday, 29 October 2010 19:42 |