I have an specific cateogry (top-level / main category) witch shows a menu on hover at menu.
I need to remove the href from that < li> item, or replace href value for "javascript:void(0);".
I'm trying to do this with page_block_html_topmenu_gethtml_before and page_block_html_topmenu_gethtml_after observers, but didn't get it yet.
I wouln't like to make a replace in block's html output. I don't think it's a good idea. =O
Does anyone have any idea?
Best Answer
To remove url, href functionality of the top menu categories, you can take the following steps:
app/code/local/Mage/Catalog/Block
pp/code/core/Mage/Catalog/Block
toapp/code/local/Mage/Catalog/Block
function _renderCategoryMenuItemHtml()
Replace this code
with this code