JOOMLA FICTION LAB
(2 votes)

How to redirect using the Joomla API

Tuesday, 28 February 2012 14:06
You can use the Joomla API to easily redirect to another url and display a relevant message after the redirection.

Joomla 1.5


global $mainframe;
$link = 'http://www.minitek.gr/';
$msg = 'You have been redirected to Minitek.gr';
$mainframe->redirect($link, $msg, $msgType='message');	

Joomla 2.5


$app = JFactory::getApplication();
$link = 'http://www.minitek.gr/';
$msg = 'You have been redirected to Minitek.gr';
$app->redirect($link, $msg, $msgType='message');
where $msgType can be message, notice or error.




Add comment


Security code
Refresh