NAVI Methods
Creating menus
menu(), submenu(), crumbs()Generating links and URLs
link(), href(), domain(), home(), language(), logout(), redirect()Navigation details
index(), details(), dynamic(), query()
redirect()
Use this method to redirect to another page. See examples below for details.
none redirect( string link [, int code ])
Return
No return value, the method will instantly redirect to new page
Parameter
Description
linkAbsolute or relative page link.
codeSend this http header code upon redirect.
Click to test REDIRECT ...
$NAVI->query('test') == 1? $NAVI->redirect('/'): false
RETURN: FALSE
... you cannot REDIRECT to same page ...
$NAVI->query('test') == 2? $NAVI->redirect($NAVI->href()): false
RETURN: FALSE
... but you can REDIRECT to any other page
$NAVI->query('test') == 3? $NAVI->redirect($NAVI->href(53)): false
RETURN: FALSE