Magento 1.9 Category Navigation – View All Display

categorymagento-1.9navigation

I have just been testing CE 1.9 using the rwd theme.

I have set up a simple category tree as follows"

Default Category
- Cat 1
--- Sub cat 1
--- Sub cat 2
--- Sub cat 3
--- Sub cat 4
- Cat 2
- Cat 3

On the front end main Navigation I'm getting an additional "View All Cat 1" link as follows:

Cat 1
- View all Cat 1
- Sub cat 1
- Sub cat 2
- Sub cat 3
- Sub cat 4

Where is the "view all" link coming form (it simply redirects to Cat1)?

Thanks.

Best Answer

The "View All ..." link for categories comes from app/design/frontend/rwd/default/template/page/html/topmenu/renderer.phtml and it is built to point to the main category. This is the piece of code that generates it.

if (!empty($_hasChildren)) {
    $html .= '<ul class="level'. $childLevel .'">';
    $html .=     '<li class="level'. $nextChildLevel .'">';
    $html .=         '<a class="level'. $nextChildLevel .'" href="'. $child->getUrl() .'">';
    $html .=             $this->__('View All ') . $this->escapeHtml($this->__($child->getName()));
    $html .=         '</a>';
    $html .=     '</li>';
    $html .=     $this->render($child, $childrenWrapClass);
    $html .= '</ul>';
}
Related Topic