I'm working on a custom Magento theme and I am stumped on how to remove the span class in the navigation.

I found the file which has it:

Mage => Page => Block => Html => Topmenu.php

I found the span which is in the <A> link but in the header of the file it says not to edit the file in case of a overwrite when updating.

Where would I place this file in my own theme's directory?

Thanks for any help.

Ben :)

P.S. I am using Magento ver.

  • you can rewrite the topmenu.php, or copy the folder structure to local code pool Jun 22, 2014 at 8:10

1 Answer 1


what you need to do is to write your own module, where you will override the Topmenu.php Block Class.

If you dont know how to setup a basic module structure in Magento, i highly recommend you to read some Tuts about it. There are also some great Tutorials about Block override in the web. Just search for "Magento Block override".

  • Thanks for this, I have checked it out and indeed used it :)
    – Tired_Man
    Jun 24, 2014 at 8:02

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.