1
0
mirror of https://github.com/e107inc/e107.git synced 2025-06-04 18:06:58 +02:00

Issue #1496 Menu Visibility FRONTPAGE

This commit is contained in:
Cameron 2016-04-15 14:09:48 -07:00
parent d86ca55647
commit 2f9e14280d

View File

@ -292,6 +292,17 @@ class e_menu
}
protected function isFrontPage()
{
if(e_REQUEST_SELF == SITEURL)
{
return true;
}
return false;
}
/**
* Check visibility of a menu against URL
@ -324,6 +335,12 @@ class e_menu
foreach($pagelist as $p)
{
if($p == 'FRONTPAGE' && $this->isFrontPage())
{
$show_menu = true;
break;
}
$p = $tp->replaceConstants($p, 'full');
if(substr($p, -1)==='!')
{
@ -345,6 +362,13 @@ class e_menu
$show_menu = true;
foreach($pagelist as $p)
{
if($p == 'FRONTPAGE' && $this->isFrontPage())
{
$show_menu = false;
break;
}
$p = $tp->replaceConstants($p, 'full');
if(substr($p, -1)=='!')
{