Page 1 of 1

How to expand the search function

Posted: Sat Apr 12, 2008 10:12 am
by forevernomad
I would like to be able to allow users to choose which area of the site they want to search.

Similar to how http://www.veoh.com do their search.

I have already coded the js/css/html for it, it works in my browser, but now I need to shift it to the CMS.

What I can't figure out is the search templates, as everything in there is tagged for the CMS.
eg. {$inputbox}, {$submittext} etc.

My Questions are:
How do I add an ID or class to these?
Can I use php/js within the search template?

Re: How to expand the search function

Posted: Sat Apr 12, 2008 10:50 am
by alby
forevernomad wrote: How do I add an ID or class to these?
??? I look your html source, input tags have a ID
If you want a own ID you have 2 option:
- hack Search module code
- if you have a "stable" template (after no other forms), copy from source html code and paste in your Search template (and add your CSS ID/class)

forevernomad wrote: Can I use php/js within the search template?
Sure, for PHP my advice is use a UDT and for JS surround your code with {literal} {/literal}

Alby

Re: How to expand the search function

Posted: Sat Apr 12, 2008 2:11 pm
by forevernomad
I look your html source, input tags have a ID
I hadn't realised they were static ids, sorry.

Would I put my {literal}js{/literal} into the search template itself or in a UDT?

Re: How to expand the search function

Posted: Sat Apr 12, 2008 3:55 pm
by alby
forevernomad wrote: Would I put my {literal}js{/literal} into the search template itself or in a UDT?
In search template

Alby

Re: How to expand the search function

Posted: Sat Apr 12, 2008 11:21 pm
by forevernomad
Thanks for that.  :)