Can I give dm_current class to myParent->parent?

5 views
Skip to first unread message

Dudi

unread,
May 21, 2012, 4:20:03 AM5/21/12
to diem-...@googlegroups.com

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?

Reply all
Reply to author
Forward
0 new messages