By pan69 on
Hi. I'm trying to theme the search and search results for my theme but somehow the HTML thats generated by Drupal is outputting a rogue
which throws out my spacing:
Enter your keywords:
See that first
. Don't know where it's coming from and I can't target it to change its style.
Any help very much appreciated.
- Luke
Comments
You might have to reword
You might have to reword your question better, because we can't see the " first ." that you mentioned.
Sorry, forgot to put 'code'
Sorry, forgot to put 'code' tags around the HTML :) The first div, can't find where that comes from.
Theming anything related to
Theming anything related to search is a real pain in the ass. What is the proper way of getting rid of the advanced search box on the results page? When no results are found there is the stupid 'blue smurf' text, where does that come from? I don't want blue smurfs on my site...
Is there any documentation that describes all this? I can't find it...
Any help very much appreciated.
Revoke permission
The advanced search box should only show up if you have the "use advanced search" permission. So by revoking that you can get rid of it easily.
To get rid of the blue smurf (we don't need no stinkin' bleu smurfs ;-) you could override the theme_box that is called in search.pages.inc:
The search_help contains the famous "smurf" text.
Alternatively you could just change the help text see here: http://drupal.org/node/21969
HTH
Arie
OK. Now where getting
OK. Now where getting somewhere. However... Disabling the permissions gets rid of the expandable menu, it still shows the "Enter your keywords" bit with the input field. Isn't that part of advanced search? How do I get rid of that. I don't want an extra search box on my results page, I already have a search box sitting in a block.
>> you could override the theme_box that is called in search.pages.inc:
Sorry, but you need to spell it out for me. I'm kinda new to this...
Thanks in advance!
Trickier than I thought
But also a lot more elegant. Add this to your template.php file and replace 'garland' with the name of your theme.
See here http://drupal.org/node/223463 for more info.
- Arie
Awesome!
Mate, thanks a bunch. You're a life saver!