Zen Cart Logo
Forums / Templates, Stylesheets, Page Layout / Moving searchbar so its inside header image

Moving searchbar so its inside header image

Locked

Views: 2,518

Results 1 to 14 of 14
This thread is locked. New replies are disabled.
4 Feb 2007, 5:10 PM
#1
v_kirk avatar

v_kirk

Zen Follower

Join Date:
Jun 2006
Posts:
110
Plugin Contributions:
0

Moving searchbar so its inside header image

The title pretty much explains it. i want to move my searchbar up so its inside the header image, so instead of looking like this:


Header Image


...........................................................................Searchbar
..................................................................................(go)

i want it to look like this:


Header Image...................................................Searchbar (go)


(ignore the periods, its so i could space it out to approx. where it would go, sense i cant use MASS spaces on the forum)

what would i have to do to make this work?

5 Feb 2007, 4:08 PM
#2
v_kirk avatar

v_kirk

Zen Follower

Join Date:
Jun 2006
Posts:
110
Plugin Contributions:
0

Re: Moving searchbar so its inside header image

would anyone know how to do this?

5 Feb 2007, 4:15 PM
#3
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Location:
Arizona
Posts:
31,500
Plugin Contributions:
4

Re: Moving searchbar so its inside header image

in your override for tpl_header.php file find this div -

<div id="navMainSearch"><?php require(DIR_WS_MODULES . 'sideboxes/search_header.php'); ?></div>

and move it into the area between bof-branding display and eof-branding display

21 Feb 2007, 11:32 PM
#4
v_kirk avatar

v_kirk

Zen Follower

Join Date:
Jun 2006
Posts:
110
Plugin Contributions:
0

Re: Moving searchbar so its inside header image

im having a hard time finding a tpl_header.php file with that coding in it, could you tell me were i could find it?

22 Feb 2007, 1:06 AM
#5
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,876
Plugin Contributions:
8

Re: Moving searchbar so its inside header image

/includes/templates/your_template/common/tpl_header.php.

If you don't have it in your custom files yet, copy it from /includes/templates/template_default/common/tpl_header.php.

24 Feb 2007, 2:48 AM
#6
v_kirk avatar

v_kirk

Zen Follower

Join Date:
Jun 2006
Posts:
110
Plugin Contributions:
0

Re: Moving searchbar so its inside header image

well...something is wrong.

i found that page that you were all talking about, but it didnt have that line of code in it. so i decided to just add the code in myself. and it gave me two searchbars. one closely were i wanted it, and then the original one that i wanted to be moved up. so then i got stuck with two, so i removed the coding that i had put in, and am now stuck at the very beginning.

comments?

24 Feb 2007, 8:36 AM
#7
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,876
Plugin Contributions:
8

Re: Moving searchbar so its inside header image

About line 64: ```php

<div id="navMainSearch"><?php require(DIR_WS_MODULES . 'sideboxes/search_header.php'); ?></div> <br class="clearBoth" /> </div> <!--eof-navigation display--> <!--bof-branding display-->
25 Feb 2007, 7:40 PM
#8
v_kirk avatar

v_kirk

Zen Follower

Join Date:
Jun 2006
Posts:
110
Plugin Contributions:
0

Re: Moving searchbar so its inside header image

its not there. ironically thats where i put the code, but its nowhere in that file, and ive never edited it.

26 Feb 2007, 2:29 AM
#9
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,876
Plugin Contributions:
8

Re: Moving searchbar so its inside header image

Where does the searchbar you have show up? Above/below what? Are you using a template you got from somewhere? That is the only reason I can think of that you would have a searchbar elsewhere in your header.

If you do have a template installed, can you switch back to Classic and see the searchbar at the top?

Do you have an untouched copy of the file under /template_default/? You might try a search in admin > Tools > Developer's Toolkit for "navMainSearch".

Best of all, can you give a url to see the output? The link in your sig doesn't redirect.

26 Feb 2007, 3:52 AM
#10
v_kirk avatar

v_kirk

Zen Follower

Join Date:
Jun 2006
Posts:
110
Plugin Contributions:
0

Re: Moving searchbar so its inside header image

no, i didnt install another template or anything. its really awkward. the url to the actual website isHERE

26 Feb 2007, 4:29 AM
#11
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,876
Plugin Contributions:
8

Re: Moving searchbar so its inside header image

OK, all is clear now! The normal position of the search in the header is above the logo and to the right on the same line as the Home & Login bar. Your template moves navMainWrapper to below the logo, and I presume the navMainSearch is turned off in admin. The code for it may have been deleted from tpl_header.php.

The search you see is not in the header at all, but in the right sidebar (navColumnTwo). You can turn that one off in Tools > Layout Boxes Controller > sideboxes/search.php and turn on sideboxes/search_header.php. If the search doesn't appear where you want it, add the code back in as shown above so there is something for the switch to control.

Someone definitely did a bunch of custom template work, as a stock ZC install will not look or behave as yours does. Find your /template_default/ directory. There will also be a /classic/ directory, and there should be another in the same place which has your template files. If the edits are in /template_default/, you could be in big trouble when you upgrade to the next version of ZC.

26 Feb 2007, 5:02 AM
#12
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,876
Plugin Contributions:
8

Re: Moving searchbar so its inside header image

I just checked your stylesheet - your edits have been made in /classic/. This is bad, as when you upgrade your cart, all of your customization will be erased.

You need to make new folders (with a name you make up) next to every /classic/ folder on your site, and copy all the files and subfolders in /classic/ to your new /your_template/ folders. Then change template_info.php, select your template in admin > Tools > Template Selection and reset the sideboxes. See full instructions in the FAQs.

26 Feb 2007, 5:22 PM
#13
v_kirk avatar

v_kirk

Zen Follower

Join Date:
Jun 2006
Posts:
110
Plugin Contributions:
0

Re: Moving searchbar so its inside header image

yeah, it would take a little work to do all that, but if i want to upgrade, i will do it. just requires a little bit of moving around, and some small editing, and whatnot. but i highly doubt ill be updating, unless there is something really big in the next version, that you for your replies, im gunna see if it works

26 Feb 2007, 10:11 PM
#14
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,876
Plugin Contributions:
8

Re: Moving searchbar so its inside header image

Aside from upgrade safety, there is another reason to use the template override system: by putting your edited files in your custom folders, you can tell at a glance what files you have changed and you have a backup without changes in case you mess up a file.