NAVI Methods
Creating menus
menu(), submenu(), crumbs()Generating links and URLs
link(), href(), domain(), home(), language(), logout(), redirect()Navigation details
index(), details(), dynamic(), query()
domain()
Return domain for index passed. This function will be useful in a multi-domain environment. When passend without index the function will return the current domain.
string domain([ int index [, int protocol = 0 [, bool encode = false ]]])
Return
Returns domain name and protocol.
Parameter
Description
indexBackend's navigation index (0 = current page)
protocol-1 = shows no protocol
0 = use current protocol
1 = //:
2 = http://
3 = https://
0 = use current protocol
1 = //:
2 = http://
3 = https://
encodeURL encode link.
Return domain
$NAVI->domain()
RETURN: 'http://developer.opus9.org'
Encode domain and link
$NAVI->domain(78, 3, true)
RETURN: 'https%3A%2F%2Fdeveloper.opus9.org'