在magento主页中的标题中移动搜索栏 [英] Move search bar from header in home page in magento
问题描述
我是一个新的magento。我想将搜索栏从标题移动到主页上的中间位置,以便它只显示在主页上。
I am a new to magento. I wanted to move the search bar from the header to the middle position on home page so that it displays only on the home page.
我已阅读了许多相关答案magento论坛,但都试图在boxes.css中编辑.mini-search元素,但不幸的是我没有这个文件中的任何这样的元素。
I've read many related answers on the magento forum but all are trying to edit .mini-search element in boxes.css but unfortunately I don't have any such element in this file.
我可以这样做吗?
So, how can I do this?
推荐答案
您需要编辑 catalogsearch.xml
在您主题的布局文件夹中,并删除以下行:
you need to edit catalogsearch.xml
in your theme's layout folder and delete the following lines:
<reference name="header">
<block type="core/template" name="top.search" as="topSearch" template="catalogsearch/form.mini.phtml"/>
</reference>
这会将其从每个页面的标题中移除。现在,将其插入您的主页。转到CMS>页面下的管理员,然后选择您的主页。将行粘贴到您希望搜索框出现的任何位置:
That will remove it from the header of every page. Now, to insert it into your homepage. Go to the admin under CMS>Pages and select your Home Page. Paste the lines into the Content section wherever you want the search box to appear:
{{block type="core/template" name="home.search" as="homeSearch" template="catalogsearch/form.mini.phtml"}}
祝你好运,
JD
Good luck,
JD
这篇关于在magento主页中的标题中移动搜索栏的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!