How to add top search to the frontpage?

Hello,

I can see the top search box in the category view and also in the article view. How can I add this search box to the frontpage at the same position?

Many thanks in advance.

Regards

6 answers

Profile photo of Css Magician 0.00 $tone March 15, 2010
Public

Dear beautyprodukte24,

Please open app\design\frontend\default\jm_leadtemplate\page\ 3columns.phtml and change lines 46 as follow:
change

Code:

<!-- PATHWAY -->
<?php if($this->getChildHtml('breadcrumbs')): ?>
<div id="ja-pathwaywrap" class="wrap">
	<div class="main  clearfix">
		<!-- breadcrums -->
		<?php echo $this->getChildHtml('breadcrumbs') ?>
		<!-- // breadcrums -->
		<div id="ja-searchwrap">
			<div id="ja-search">
				<?php echo $this->getChildHtml('topSearch') ?>
			</div>
		</div>
	</div>
</div>
<?php endif; ?>
<!-- PATHWAY -->

to

Code:

<!-- PATHWAY -->
<div id="ja-pathwaywrap" class="wrap">
	<div class="main  clearfix">
		<!-- breadcrums -->
		<?php echo $this->getChildHtml('breadcrumbs') ?>
		<!-- // breadcrums -->
		<div id="ja-searchwrap">
			<div id="ja-search">
				<?php echo $this->getChildHtml('topSearch') ?>
			</div>
		</div>
	</div>
</div>
<!-- PATHWAY -->

and open skin\frontend\default\jm_lead\csstheme.css , change line 314 as follow:

Code:

#ja-searchwrap  {
 float: right;
 padding-bottom: 10px;
}
#1
Profile photo of Michael Cao 0.00 $tone July 29, 2010
Public

yes, this method is very good but still there is little problem:

First, could we let the products slider is in same line with the search bar then I think it will be more beautiful!

Second, I agress that your search bar is very cool but I don’t think everyone, especial for women, know after write keywords then just press enter. I think if you can show some tips in the search bar and when they move the mouse to search bar and click then tips fade, could you understand what’s my mean? Then I think it’s more useful for customer, don’t you think so?

#3
congtq 0.00 $tone July 29, 2010
Public

Dear herahairsalon

First, could we let the products slider is in same line with the search bar then I think it will be more beautiful!

Sorry, because markup of JM Lead was set that so it’s difficult to let the products slider is in same line with the search bar ( you will have to change a lot of code).
You can change as below for more beautiful:
Open app\design\frontend\default\jm_leadtemplate\page\ 3columns.phtml file and replace

Code:

<?php if($this->getChildHtml('breadcrumbs')): ?>
<div id="ja-pathwaywrap" class="wrap">
	<div class="main  clearfix">
		<!-- breadcrums -->
		<?php echo $this->getChildHtml('breadcrumbs') ?>
		<!-- // breadcrums -->
		<div id="ja-searchwrap">
			<div id="ja-search">
				<?php echo $this->getChildHtml('topSearch') ?>
			</div>
		</div>
	</div>
</div>
<?php endif; ?>

with

Code:

<div id="ja-pathwaywrap" class="wrap">
	<div class="main  clearfix">
		<?php if($this->getChildHtml('breadcrumbs')): ?>
		<!-- breadcrums -->
		<?php echo $this->getChildHtml('breadcrumbs') ?>
		<!-- // breadcrums -->
		<?php else: ?>
		<div id="ja-pathway">Home</div>
		<?php endif; ?>
		<div id="ja-searchwrap">
			<div id="ja-search">
				<?php echo $this->getChildHtml('topSearch') ?>
			</div>
		</div>
	</div>
</div>

Second, I agress that your search bar is very cool but I don’t think everyone, especial for women, know after write keywords then just press enter. I think if you can show some tips in the search bar and when they move the mouse to search bar and click then tips fade, could you understand what’s my mean? Then I think it’s more useful for customer, don’t you think so?

1. Open app\design\frontend\default\jm_leadtemplate\catal ogsearch\form.mini.phtml file
2. Replace

Code:

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

with

Code:

<input id="search" type="text" onfocus="if(this.value=='Input keyword and press enter key') this.value='';" onblur="if(this.value=='') this.value='Input keyword and press enter key';" value="Input keyword and press enter key" class="input-text" name="<?php echo $this->helper('catalogSearch')->getQueryParamName() ?>" value="<?php echo $this->helper('catalogSearch')->getEscapedQueryText() ?>" />
#4
Profile photo of Michael Cao 0.00 $tone July 29, 2010
Public

Thanks for your quick reply and I have added the words in search bar but about the first step, it just add "home", can we let it show better? such as "You’re currently on: * Home ", just like the product page? Please help, thanks!

#5
congtq 0.00 $tone August 2, 2010
Public

Oh, very simple.
You only add
PHP Code:

<h4><?php echo $this->__("You're currently on:"?></h4>


in front of "Home"

#6

This question is now closed

Written By

Comments