Magento – show product search at all times when using 1 column homepage but 2 column subpages
A common question amongst Magento developers is how to get the product search form (mini) to show at all times (in header of website frontend) when using 1 column homepage but 2 column (or 3 column) subpages.
The answer is simple:
Update the catalog search layout xml file, which references the mini search form so that it moves the block in question. Here are the steps to follow:
1. Open the file catalogsearch.xml in your themes /layout/ folder.
2. Find the line that includes ‘template=”catalogsearch/form.mini.phtml”‘ – this is where the block is pulled out on frontend.
3. Change the value of
6. Your product search form will now show on all pages. The next step to take is to style the form box so that it appears in your header.
7. You can do this by positioning the div “absolute” with top positioning, but ensure you position your wrapper or page or main div as relative.