[英]How to add active class to the navigation link in magento?
I have added one category in navigation and other links in it. 我在导航中添加了一个类别,并在其中添加了其他链接。 But when I cick on the category menu it will having active class and if I click on other links it does not have active class. 但是,当我单击类别菜单时,它将具有活动的班级;如果单击其他链接,它将没有活动的班级。 So how to solve this problem? 那么如何解决这个问题呢?
Take a look into your top.phml file in your theme since that is where your top menu items render, you could override something there to add your active state. 看一下主题中的top.phml文件,因为这是顶层菜单项的呈现位置,您可以在此处覆盖某些内容以添加活动状态。
app / design / frontend / default / THEMENAME / template / catalog / navigation / top.phtml 应用程序/设计/前端/默认/ THEMENAME /模板/目录/导航/ top.phtml
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.