I was able to add a new tab based on department access. I want to add another tab but it does not show up. I show that it should be displaying but it is not. I modified the class.nav.php file and here is my syntax

if(($mydepts = $thisstaff->getDepts()) && ($depts=Dept::getDepartments())) {
foreach($depts as $id =>$name) {
if(!in_array($id, $mydepts)) continue;
if (strpos($name, "Maintenance - Dep1") !== false) {
$display1= true;
};

                    if (strpos($name, "Maintenance - Dep 2") !== false) {
                        $display2 = ture;
                    };
            }
        }

if($display1 === true) {
$this->tabs['MD1Report'] = array('desc'=>('Maintenance Report'),'href'=>'customPage.php','title'=>('Maintenance Dept 1 Report'));
};

        if($display2 === true) {
			$this->tabs['MD2Report'] = array('desc'=>__('Maintenance Dept 2 Report'),'href'=>'customPageD2.php','title'=>__('Maintenance Dept 2 Report'));		
		};
Write a Reply...