getStoreCategories() as $_category): ?> drawItem($_category) ?>

The magento category display, I want to edit the categories tree code, but I do not now where.

For example, the categories code like this, I want to edit the class name. which file should I need to edit?

enter image description here

1 Answer 1


app/code/core/Mage/Catalog/Block/Navigation.php (on Magento

Method _renderCategoryMenuItemHtml

The block is cached, so make sure to clean cache after your edits.

(also, do not directly edit this file, rewrite the block class and use OOP - there are many tutorials around: http://inchoo.net/magento/overriding-magento-blocks-models-helpers-and-controllers/ )

Also, for next time, you can just turn on template-hints to see where the HTML comes from

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.