How do I remove view all for one specific category only? These categories do not have children which I think is the problem.

I tried editing renderer.phtml at line 62 with this if statement but it still shows for my category id 3.

if ($_catid = $this->getCategoryid('3')) {}
                            else {
        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>';


2 Answers 2


The reason is that the menu has no idea about the category id. It is simply a node tree. What you could do is take the value of $child->getId() and extract the id from it. This id value should look something like category-node-12 where 12 is the category id.

Though I would maybe suggest that though this would be a fairly "easy" change it is not that flexible and you should really look into how the menu is built.

Another possible idea is to use the event page_block_html_topmenu_gethtml_before and unset the children for your desired category here.


Say you want to hide the view all under your second category only. You know the class for the second list item is nav-2 and all view all's have the class view-all. So to hide the view all for second category only you would add this to your css file:

.nav-2 .view-all {

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.