call it from your template with {Redirection myPageAlias="$page_alias"}
Make a UDT with a name Redirection
Code: Select all
if ($_SESSION['last_page'] == ''){
$_SESSION['last_page_2'] = 'home';
} else {
$_SESSION['last_page_2'] = $_SESSION['last_page'];
}
if ($_SESSION['current_page'] == ''){
$_SESSION['last_page'] = 'home';
} else {
$_SESSION['last_page'] = $_SESSION['current_page'];
}
$_SESSION['current_page'] = $params['myPageAlias'];
$smarty->assign('last_page_2', $_SESSION['last_page_2']);
job done