当前位置: 动力学知识库 > 问答 > 编程问答 >

javascript - Magento - Marking CMS Pages As “Active” In Navigation

问题描述:

Very simple one I guess, but there doesn’t seem to be an obvious write up about this. Adding the CMS pages to the nav menu is quirky for sure, but how do you mark them as active after using the URL Redirection method?

If someone could share the instructions for myself and the good of the community, that would be very helpful!

网友答案:

If you are using Magento 1.7 or higher, here is a nice way to add anything in the main menu.

The idea is to use the event page_block_html_topmenu_gethtml_before to add nodes to the main tree.
When adding a node (menu item) you can specify a condition for it to be selected in the array item is_active.

分享给朋友:
您可能感兴趣的文章:
随机阅读: