Next Webinar: Maximizing Magento - Get the Most out of Promotions. Register Today!

Magento

Open Source eCommerce Evolved

Magento Forum

   
To Move The Search in the Orizontal Menu. 
 
Black Cat
Guru
 
Avatar
Total Posts:  688
Joined:  2008-02-14
Gonnesa (Italy)
 

Hi.
I would like to move the “search” box from the header to the horizontal menu, to the right of the topmenu (categories). Particularly it would serve me move it inside the div with class="header-nav-container." Is the problem that this tag is not found in the file header.phtml, but in another file recalled by the function <? php echo $this->getChildHtml ('topMenu')?>,
How can I do to move the box search inside “header-nav-container?”

 Signature 

Cerchi un Webdesigner o grafico per Magento? Contattami

Maintainer Traduzione Italiana
Moderatore Forum Italiano Magento
Magento Webdesigner

-------------My Blog--------------

 
Magento Community Magento Community
Magento Community
Magento Community
 
zugzug20
Jr. Member
 
Total Posts:  1
Joined:  2008-04-20
 

Okay, my solution, which I am not sure if it is the correct way or not is as follows:

Open up page/html/header.phtml and catalog/navigation/top.phtml

page/html/header.phtml should look like this:

<div class="header-nav-container">
<div class="header-nav">
<?php echo $this->getChildHtml('topSearch') ?>
<?php echo $this->getChildHtml('topMenu') ?>
</div>
<?php echo $this->getChildHtml('topLeftLinks') ?>
</div>

catalog/navigation/top.phtml should look like this:

<h4 class="no-display"><?php echo $this->__('Category Navigation:') ?></h4>
<ul id="nav">
<?php foreach ($this->getStoreCategories() as $_category): ?>
<?php echo $this->drawItem($_category) ?>
<?php endforeach ?>
</ul>

You’ll need to add “position:relative” to .header-nav in boxes.css in order to real in the form though.

 
Magento Community Magento Community
Magento Community
Magento Community
 
sdb
Sr. Member
 
Avatar
Total Posts:  221
Joined:  2007-11-13
coastal California, USA
 

i dont know if you got it to work already, but this was my solution

i cut and pasted the code from where the search box was and moved it to

/template/catalog/navigation/left.phtml
and placed it where i wanted it to go

(you will also want to change the relevant css in boxes.css)

<form id="search_mini_form" action="<?php echo $this->helper('catalogSearch')->getResultUrl() ?>" method="get">

    <
fieldset class="mini-search">

    <
legend><?php echo $this->__('Search Site'?></legend>

        <
input id="search" type="text" class="input-text" name="<?php echo $this->helper('catalogSearch')->getQueryParamName() ?>" value="<?php echo $this->helper('catalogSearch')->getEscapedQueryText() ?>"/>

        <
input type="image" src="<?php echo $this->getSkinUrl('images/btn_mini_search.gif') ?>" alt="<?php echo $this->__('Search') ?>"/>

        <
div id="search_autocomplete" class="search-autocomplete"></div>

        <
script type="text/javascript">

            var 
searchForm = new Varien.searchForm('search_mini_form''search''<?php echo $this->helper('catalogSearch')->__('Search entire store here...') ?>');

            
searchForm.initAutocomplete('<?php echo $this->helper('catalogSearch')->getSuggestUrl() ?>''search_autocomplete');

        
</script>

    
</fieldset>

</
form>

 Signature 

my preferred host: http://www.schostpro.com

 
Magento Community Magento Community
Magento Community
Magento Community
 
Black Cat
Guru
 
Avatar
Total Posts:  688
Joined:  2008-02-14
Gonnesa (Italy)
 

don’t work|
besides to me it served the search as a block independent from any other and easily modifiable before and after another block

 Signature 

Cerchi un Webdesigner o grafico per Magento? Contattami

Maintainer Traduzione Italiana
Moderatore Forum Italiano Magento
Magento Webdesigner

-------------My Blog--------------

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
    Back to top
 
Sales: Call 877.832.5289 (North America) 310.295.4144 (International)
© Copyright 2008 Varien. Magento is a trademark of Irubin Consulting Inc. DBA Varien
Privacy Policy|Terms of Service
Magento Community Count
41223 users|374 users currently online|87968 forum posts