我是 magento 的新手。我想将搜索栏从标题移动到主页的中间位置,以便它仅显示在主页上。
我在 magento 论坛上阅读了许多相关答案,但所有人都在尝试编辑 box.css 中的 .mini-search 元素,但不幸的是我在此文件中没有任何此类元素。
那么,我该怎么做呢?
你需要编辑catalogsearch.xml
在主题的布局文件夹中并删除以下行:
<reference name="header">
<block type="core/template" name="top.search" as="topSearch" template="catalogsearch/form.mini.phtml"/>
</reference>
这将从每个页面的标题中删除它。现在,将其插入您的主页。转到 CMS> 页面下的管理并选择您的主页。将这些行粘贴到内容部分中您希望搜索框出现的位置:
{{block type="core/template" name="home.search" as="homeSearch" template="catalogsearch/form.mini.phtml"}}
祝你好运,
JD
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)