Example #1
0
 protected function _getMenuItemClasses(Varien_Data_Tree_Node $item)
 {
     $classes = array();
     $classes[] = 'level' . $item->getLevel();
     $classes[] = $item->getPositionClass();
     if ($item->getIsFirst()) {
         $classes[] = 'first';
     }
     if ($item->getIsActive()) {
         $classes[] = 'li_on';
     }
     if ($item->getIsLast()) {
         $classes[] = 'last';
     }
     if ($item->getClass()) {
         $classes[] = $item->getClass();
     }
     if ($item->hasChildren()) {
         $classes[] = 'parent';
     }
     return $classes;
 }
 protected function _getMenuItemClasses(Varien_Data_Tree_Node $item)
 {
     $classes = array();
     $classes[] = 'level' . $item->getLevel();
     $classes[] = $item->getPositionClass();
     if ($item->getIsFirst()) {
         $classes[] = 'first';
     }
     if ($item->getIsActive()) {
         $classes[] = 'active';
     }
     if (Mage::helper('core/url')->getCurrentUrl() == str_replace(Mage::helper('catalog/product')->getProductUrlSuffix(), "", $item->getUrl())) {
         $classes[] = 'custom-active';
     }
     if ($item->getIsLast()) {
         $classes[] = 'last';
     }
     if ($item->getClass()) {
         $classes[] = $item->getClass();
     }
     if ($item->hasChildren()) {
         $classes[] = 'parent';
     }
     return $classes;
 }
Example #3
0
 /**
  * Returns array of menu item's classes
  *
  * @param Varien_Data_Tree_Node $item
  * @return array
  */
 protected function _getMenuItemClasses(Varien_Data_Tree_Node $item)
 {
     if (Mage::getStoreConfig('mpanel/general/enabled')) {
         $classes = array();
         $classes[] = 'level' . $item->getLevel();
         $classes[] = $item->getPositionClass();
         if ($item->getIsFirst()) {
             $classes[] = 'first';
         }
         if ($item->getIsActive()) {
             $classes[] = 'active';
         }
         if ($item->getIsLast()) {
             $classes[] = 'last';
         }
         if ($item->getClass()) {
             $classes[] = $item->getClass();
         }
         if ($item->hasChildren()) {
             if ($item->getLevel() == 0) {
                 $classes[] = 'dropdown';
             } else {
                 $classes[] = 'dropdown-submenu';
             }
         }
         return $classes;
     } else {
         $classes = array();
         if ($item->getIsFirst()) {
             $classes[] = '';
         }
         if ($item->getIsActive()) {
             $classes[] = 'active';
         }
         if ($item->getIsLast()) {
             $classes[] = '';
         }
         if ($item->getClass()) {
             $classes[] = $item->getClass();
         }
         if ($item->hasChildren()) {
             $classes[] = 'dropdown';
         }
         return $classes;
     }
 }
Example #4
0
 protected function _getMenuItemClasses(Varien_Data_Tree_Node $item)
 {
     Mage::log('hi', null, 'nil.log');
     $classes = array();
     $classes[] = 'level' . $item->getLevel();
     $classes[] = $item->getPositionClass();
     if ($item->getIsFirst()) {
         $classes[] = 'first';
     }
     if ($item->getIsActive()) {
         $classes[] = 'active';
     }
     if ($item->getIsLast()) {
         $classes[] = 'last';
     }
     if ($item->getClass()) {
         $classes[] = $item->getClass();
     }
     if ($item->hasChildren()) {
         $classes[] = 'dropdown';
     }
     return $classes;
 }