1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-12 17:44:37 +02:00

News Carousel added and a method to check if a menu is loaded. (see e107_plugins/news/e_header.php )

This commit is contained in:
Cameron
2014-01-30 10:14:13 -08:00
parent 859c71d1a2
commit 1d5e08197c
5 changed files with 190 additions and 8 deletions

View File

@@ -237,8 +237,32 @@ class e_menu
return $eMenuArea;
}
/**
* Returns true if a menu is currently active.
* @param string $menuname (without the '_menu.php' )
*/
function isLoaded($menuname)
{
if(empty($menuname))
{
return false;
}
foreach($this->eMenuActive as $area)
{
foreach($area as $menu)
{
if($menu['menu_name'] == $menuname."_menu")
{
return true;
}
}
}
return false;
}