Set link to anchor for current page, to easily dismiss menu
This commit is contained in:
parent
a4b01d1259
commit
528ea62f38
|
@ -15,6 +15,7 @@ function navbar($depth, $active = NULL) {
|
||||||
if ($caption !== 'webmail') {
|
if ($caption !== 'webmail') {
|
||||||
$link = rtrim(str_repeat('../', $depth) . $link, '/') . '/';
|
$link = rtrim(str_repeat('../', $depth) . $link, '/') . '/';
|
||||||
}
|
}
|
||||||
|
if ($isActive) $link = '#';
|
||||||
$result .= "\t\t<li" . ($isActive ? ' class="active"' : '') . '>'
|
$result .= "\t\t<li" . ($isActive ? ' class="active"' : '') . '>'
|
||||||
. '<a href="' . $link . '">'
|
. '<a href="' . $link . '">'
|
||||||
. $caption
|
. $caption
|
||||||
|
|
Loading…
Reference in New Issue