How do I remove the View All link from the menu in rwd theme?
This is the current set of categories I have and how I want it to show in the menu
Category 1
— Subcategory 1
—- Subcategory 1
— Subcategory 2
Category 2
— Subcategory 1
When using rwd it shows the menu like this
Category 1
–View All Category 1
— Subcategory 1
—- View All Subcategory 1
—- Subcategory
— Subcategory 2
Category 2
— Subcategory 1
I've tried searching but can't find a solution to this.
Best Answer
To do this you'll first want to (if you haven't already) create a custom template directory within the RWD design package. This avoids re or overwriting your default templates that live in
magento/app/design/frontend/rwd/default/template
.For the sake of example we'll create
magento/app/design/frontend/rwd/custom/template
The specific template we're going to be editing is the topmenu
renderer.phtml
- which resides atmagento/app/design/frontend/rwd/default/template/page/html/topmenu/renderer.phtml
. To extend this file properly, create a matching directory structure within themagento/app/design/frontend/rwd/custom/template
directory we just created - you should end up with a directory that looks like this:magento/app/design/frontend/rwd/custom/template/page/html/topmenu
Once your topmenu template directory has been created, copy the
renderer.phtml
file fromrwd/default/template/page/html/topmenu
into therwd/custom/template/page/html/topmenu
directory you just created.This file should contain the following code at ~ lines 62 - 71:
In your copied file, you'll want to remove or comment out the mid-section so that you're left with:
Once you've saved your file you can go into adminhtml -> System -> Configuration -> General -> Design -> Themes and set the field "Templates" to the value "custom" -> Save Config and then clear cache.
You should now no longer see the "View All XXX" portion of your sites navigation!