0

Hi I'm hoping someone will be able to tell me how to reposition the search bar in this template http://dev-mdl.net/kitchen_store/magento/.

I want to move it into the position that the 'Default welcome msg!' is in currently.

2

Without having access to the template files, the search box is probably in a file called something like header.phtml in a folder something like /template/page/html/

If you look into the layout file catalogsearch.xml you'll see where the search box is referenced.

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

In my version of header.phtml the search box is rendered by this call:

<?php echo $this->getChildHtml('topBar') ?>

So, to get the search box moved, I would change where the call to getChildHtml('topBar') is made in the file - so, in my case I'd look to see where the welcome msg is rendered ( The default msg is rendered something like this: <p class="welcome-msg"><?php echo $this->getWelcome()?></p>) & replace it with <?php echo $this->getChildHtml('topBar') ?>

You'll then no doubt need to change the css to get the search box to look how you want. Cheers

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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