By rmyoung on
I am new to drupal and am not sure if this is the right place to post this question. I am using a modified zen theme and would like to replace the drupal search with a google search in the top right hand side of the page ie. in the header to the right of the site name. I have added the google co-op CSE module and I have tried placing it in the header block but this puts it below the actual head region ie. below the logo. I am not sure if I should be using css to move it into the right position or do I need to modify the page.tpl file? I am good with xhtml and css but rather inexperienced with php. Thanks in advance.
Comments
If you want the Google
If you want the Google search box to appear in the exact position, you're probably going to have to edit the page.tpl.php, as you suspected. If you comment out the section of the template that looks something like this:
...and put your Google invocation code there instead, you should get the result you want, though you will have to adjust the size of the Google search box to match and fit precisely.
Proton Cannon
Custom google search works but only if in region
I activated the google CSE module and added the following code to my page.tpl.php where the old search box was:
This displays the google custom search box where I wanted it but it will only show up if I have the google CSE activated in one of the regions such as a sidebar. It don't want to have 2 search boxes so is there any way around this? If I deactivate the region one it dissapears from the head of the page where I want it.