I am trying to add a search field to the chameleon theme, and need to know how it is done. A php snippet would be great. I am using this theme, since it is simplistic, however I do require a search form, since the site will grow to a fair size.

Comments

dbeall’s picture

Hi, I was just looking around on one of my sites and see that u r right, it's not in the theme.. However, the search form is available in a block.. or you can work it into the code into the page.tpl with print $search_box

steven1350’s picture

thanks, but it didnt work :(

I enter that code, but the $search_box variable did not return anything.

dbeall’s picture

I was just looking at it and tryed to reply back...that theme doesn't have a page.tpl file

Try using the search block for it....

steven1350’s picture

How do I do that?

I tried added your snippet to the .theme file, since that is where the bulk of this theme is coded

dbeall’s picture

I am looking in my theme folder and I don't see a .theme file..
I have to go get a copy and play with it.. give me a sec to check it out..

editing.. I can't get a copy. my ftp isn't working on my xp box.. and Linux refuses to open the file.

dbeall’s picture

another way may be to add a menu link -- mysite.com/search/node or mysite.com/search

steven1350’s picture

neither worked. I just got page not found errors

WorldFallz’s picture

Make sure you have the search module enabled-- even though chameleon is not a phptemplate theme (and therefore does not have access to the nice $php theme variables), it should still have a search block if you have search enabled.

EDIT: since chameleon is not a phptemplate based theme and has been removed from d7, you may wish to change to a more standard phptemplate based one. I've seen quite a few that have a similar 'simple' layout.

steven1350’s picture

hmmmmmm, I feel like a tard. The search module wasnt enabled before.

I enabled it now, and I can get the search block. Still, is it possible to manually create a form that will submit to search?

WorldFallz’s picture

Yes-- but i've no idea how you would need to do it with a non-phptemplate based theme.