2

When I define a subcategory (i.e. sub1) in a category (i.e. main1), the resulting top menu displays:

  1. The title of the category (main1)
  2. The submenu with 2 option
  3. View all main1
  4. sub1

Why the View all text gets appended with category name ? How to disable it?

Also I am using custom package and made rwd/default as parent theme in theme.xml. Do we need to copy css and js too form skin folder too ?

View All

1

Add this to your custom CSS to hide the "view all" item:

.view-all {
    display: none;
}

Also I am using custom package and made rwd/default as parent theme in theme.xml. Do we need to copy css and js too form skin folder too ?

You don't need to copy anything. Copy single templates if you really must change the markup but the ideal child theme just contains new files and doesn't copy files from the parent:

  1. Layout goes here:

    app/design/frontend/package/theme/local.xml

  2. CSS goes here:

    skin/frontend/package/theme/custom.css

  3. Other new files:

    additional templates, scripts and images.

  • custom.css is included automatically. For the rest, maybe you should open a new question. – Fabian Schmengler Feb 12 '15 at 10:06
  • 1
    The "View All XXXX" link is unnecessary on large screens, as users can simply click the parent link. However on small screens, it is necessary if you want users to be able to click through to that category. So I would recommend only hiding the "View All" text at a larger breakpoint. – Erik Hansen Feb 12 '15 at 15:15
  • @ErikHansen, so whioch solution is most preferrable ? – Slimshadddyyy Feb 16 '15 at 5:30
4

You could use CSS to hide on desktop and show it on mobile as the main link is not clickable om touch devices this why it is there.

Or you can edit /app/design/frontend/rwd/default/template/page/html/topmenu/renderer.phtml

comment or delete line 62 to 68

     $html .=     '<li class="level'. $nextChildLevel .' view-all">';
            $html .=         '<a class="level'. $nextChildLevel .'" href="'. $child->getUrl() .'">';
            $html .=             $this->__('View All') . ' ' . $this->escapeHtml($this->__($child->getName()));
            $html .=         '</a>';
            $html .=     '</li>'

;
  • Thanks for responding, but I do not wish to show View All. WHen user hovers on any parent category, it should show only its child elements. – Slimshadddyyy Feb 12 '15 at 9:49
  • 1
    easy comment or delete line 62 to 68 template/page/html/topmenu/renderer.phtml – Ahmed Elawadi Feb 12 '15 at 9:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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