如何在 Magento 中创建下拉菜单
我是 Magento 的新手。我想在 Magento 中创建一个下拉菜单。当我们使用鼠标烤箱主菜单时,它将显示显示子菜单的下拉菜单。
标题导航由 top.phtml
管理
location:app/design/frontend/default/shalu_theme/template/catalog/navigation/top.phtml
在标题中它显示了三个主要类别和还在前端显示子类别。在管理中,我在下面给出了三个主要类别
Admin->Catalog->Select Manage Category
CATEGORY:
Furniture(6)
Electronics(42)
Apparel(66)
我想创建一个下拉菜单意味着这三个主要类别
为主标题导航。子类别应显示在下拉列表中。
I am new on Magento. I want to create a dropdown for menu in Magento. When we take mouse oven main menu it will show drop down that display sub menu.
Header navigation manage by top.phtml
location:app/design/frontend/default/shalu_theme/template/catalog/navigation/top.phtml
In header it shows three main category and also showing sub category on frontend. In admin I am having three main category given below
Admin->Catalog->Select Manage Category
CATEGORY:
Furniture(6)
Electronics(42)
Apparel(66)
I want to create a drop down menu mean that these three main category
as a main header navigation. And sub category should be shown in drop down.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
当然这是可能的,但显示“下拉”菜单并不是真正的“Magento”事情。
默认情况下,Magento 在加载
$this->getchild('topmenu')
的'page/html/header.phtml'
中显示一棵树。从那里您可以使用 CSS/JS 使其成为您想要的下拉菜单。Well ofcorse this is possible, but it isn't really a "Magento" thing to show a "dropdown" menu.
By default Magento is showing a tree in the
'page/html/header.phtml'
where$this->getchild('topmenu')
is loaded. From there you can play with CSS/JS to make it a dropdown menu you wish.添加此代码
Add this code