1

My Search bar is currently on my Homepage

Code is:

<reference name="header">
    <block type="core/template" name="top.search" as="topSearch" template="catalogsearch/form.mini.phtml"/>
</reference>

I want to make the search bar appear on my New products Page

2
  • <block type="core/template" name="top.search" as="topSearch" template="catalogsearch/form.mini.phtml"/>
    – Pawankumar
    May 15, 2017 at 10:51
  • <?php echo $this->getChildHtml(‘topSearch’) ?> in template you can call like this
    – Pawankumar
    May 15, 2017 at 10:51

1 Answer 1

2

in your local.xml

<catalog_product_view>
   <reference name="product.info">
      <block type="core/template" name="product.view.search" as="productViewSearch" template="catalogsearch/form.mini.phtml"/>
   </reference>
</catalog_product_view>

then in app/design/frontend/rwd/default/template/catalog/product/view.phtml add call children

<?php echo $this->getChildHtml('productViewSearch') ?>
1
  • yes first of all, dont mind to asking here brother, i will remove these comments surely. but there is one editor for formatting the content. thats y i used to be the content in better view. you rejected that chance also. May 16, 2017 at 12:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.