I'm wondering how could I give class dm_current to myParent->parent?
I validate and render my subMenu by
public function render(){
if( self::$bParent == 0 ){
return parent::render();
}
self::$bParent = 0;
$html = '<div id="sub-menu">';
foreach( $this->children as $child ){
$tempArray = explode("-",$child->name);
$childName = $tempArray[count($tempArray)-1];
$childName = strtolower($childName);
$tempParent = $this->whereAmI[1];
if ( $childName == $tempParent )
{
$html .=$child->render();
}
}
return $html . '</div>';
}
But it works at lvl 2 but when I go to lvl 3 it only render subMenu, without backlight. I know reason of that situation. So there is my question. How I can give dm_current to myParent->parent?