getChildren(); $parentLevel = $menuTree->getLevel(); $childLevel = is_null($parentLevel) ? 0 : $parentLevel + 1; $counter = 1; $childrenCount = $children->count(); $parentPositionClass = $menuTree->getPositionClass(); $itemPositionClassPrefix = $parentPositionClass ? $parentPositionClass . '-' : 'nav-'; foreach ($children as $child) { $child->setLevel($childLevel); $child->setIsFirst($counter == 1); $child->setIsLast($counter == $childrenCount); $child->setPositionClass($itemPositionClassPrefix . $counter); $outermostClassCode = 'level'. $childLevel; $_hasChildren = ($child->hasChildren()) ? 'has-children' : ''; $html .= '
  • _getRenderedMenuItemAttributes($child) .'>'; $html .= ''. $this->escapeHtml($this->__($child->getName())) .''; if (!empty($childrenWrapClass)) { $html .= '
    '; } $nextChildLevel = $childLevel + 1; if (!empty($_hasChildren)) { $html .= ''; } if (!empty($childrenWrapClass)) { $html .= '
    '; } $html .= '
  • '; $counter++; } return $html;