Magento. 如何管理移动菜单以及如何在移动视图中编辑链接
April 6, 2015
在本教程中,我们将教你如何管理移动菜单以及如何编辑出现在Magento移动视图上的链接.
Magento. 如何管理移动菜单以及如何在移动视图中编辑链接
-
在Magento中的移动菜单链接是从 header and footer links of the main store view:
-
定义移动菜单的主代码有这个类
. It is added to header.phtml file in app/design/frontend/ /默认/ themeXXX /模板/页面html directory on your server:在这段代码中,您可以看到main sources 它们定义了移动设备上的菜单链接:
-
the Home 链接位于同一代码的 header.phtml file:
__('Home') ?>
-
My Account, My Whishlist, Log In and Log Out 菜单链接可以在 customer.xml file in “app/design/frontend/default/themeXXX/layout” directory on your server.
-
My Cart and Checkout links code is in the checkout.xml file in the same directory:
-
查看本教程了解更多关于如何 管理标题链接在Magento.
-
the Currency, as well as the Language link, are located in header.phtml file:
getChildHtml('currency_2') ?> getChildHtml('store_language_2') ?>
-
Note: 如果从滑动菜单代码中删除这些链接,它们仍将显示在主界面上 store view.
-
About Us, Customer Service and Privacy Policy are Magento static block 可以从管理面板中编辑的链接 CMS-> Static blocks->Footer Links section:
-
Product Sitemap and Category Sitemap 链接位于 catalog.xml file in “app/design/frontend/default/themeXXX/layout” directory.
-
Advanced Search link is in the catalogsearch.xml file in the same directory on your server.
-
Orders and Returns menu item is in sales.xml file in app/design/frontend/default/themeXXX/layout.
在本教程中,您将看到有关的更多细节 “订单和退货”链接
-
查看这个详细的教程,了解如何 管理页脚链接在Magento.
仅从移动菜单删除链接
注意:如果从主文件中删除链接(它最初是在主文件中添加的), 它不仅会从手机菜单上消失, but from the main store view as well.
-
如果您只想从移动视图中删除某些链接,则需要创建一个新的 CSS @media Query rule.
-
的帮助下检查菜单项的css类 Firebug plugin 或者用你的其他工具 browser.
-
Create a media Query 规则的宽度取决于你手机屏幕的宽度. For example:
@media screen and (max-width: 765px) { .top-link-blog > a { display: none !important; } }
-
控件的底部添加新规则 responsive.css file in /skin/frontend/default/themeXXX/css folder on your server.
-
保存更改并在前端检查更新后的移动菜单.
编辑出现在移动菜单链接旁边的图标
-
菜单项旁边的图标由 Fontawesome 在一个特殊的类的帮助下添加到CSS文件中的图标,每个图标都是唯一的.
-
的帮助下检查图标类 Firebug plugin 或者其他开发人员工具. 控件中添加图标类 styles.css file located in /skin/frontend/default/themeXXX/css folder on your server:
-
在你的 hosting cpanel or use the FTP 连接到您的服务器. 找到你用Firebug检查过的行,寻找图标类:
-
Go to the 官方字体Awesome网站 找到你的偶像所在的班级.
-
要更改图像,请替换中当前图标的类 styles.css 与类的新图标,你喜欢从项目类的列表上的官方字体Awesome网站.
-
保存更改并检查新图标在站点前端的显示情况.
-
对要更改的其他图标执行此过程.
我们希望本教程对您有所帮助. 请随时查看下面的详细视频教程: