-
Notifications
You must be signed in to change notification settings - Fork 190
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bootstrap navigation active item BUG #128
Comments
And to confirm, this DOESN’T happen if you remove the “home” link?
|
Yes, i confirm. |
You’ll need to trace down through the Topmenu.php class to see where the “active” attribute is being set. I have that setup on many client sites and don’t experience that issue at all. Let me know how you go!
|
I've noticed that when i clear the cache, everything is OK. But i didn't modify you code, i only changed the layout of the navigation by CSS. And the Magento installation is default/clean. This makes the bug hard to recreate. When the store is cached for a while, but bug will come back. Is this info of any help? |
Leave your cache off while developing. I would guess if it only happens when caching is turned on, it has something to do with Magento's "getCacheKey" in the navigation class. Gives something to work off though Sent from my iPhone Please excuse my brevity
|
Okay, thanks. Hopefully i've been of any help with this report. |
I've been bugged by this issue for a while and decided to do something about it today, I think I found a quick and dirty fix. Like Ben said, it has to do with Magento's core modules setting cache keys for the top menu. I added one extra cache key to specify the CMS page (that way each CMS page gets a cached copy of the menu with active attributes either set or not set). There may be a more efficient way of doing this than I did, but this is working for me. Make copy of /app/code/core/Mage/Page/Block/Html/Topmenu.php to app/code/local directory to edit. Make the change marked at line 239:
|
Thank you, this works perfectly for me. |
Somehow it's still not working. The bug is always active. Look for example to this webstore: http://www.krijtverfkopen.nl/
You will see that the category item within the menu is staying at category Krijtverf. Ofcourse, when i clear the cache, the correct category item will be shown. Any solutions? |
Hi there, I really don’t have any solutions without access to your server’s backend. This would be something I could do on a contractual basis. If you’d like this help, please email hello [at] webcomm.io http://webcomm.io/ and we can talk there :)
|
Hello,
The menu active buttons are buggy when you add a "Home" button within the navigation in the topmenu.phtml like this:
See: http://seamless.dehaanwerkbank.nl/ for a live example. The menu item "Category 1" is active while being on the homepage.
How can i fix this?
The text was updated successfully, but these errors were encountered: