The default is search all categories in include_search_bar.html. Is it possible for me to set up another page so that users can search only one category by default? For instance, I will have a page with all my categories. Then if they click on a category, they will go to another page to search only that category. Now they have to choose between seach all categories and search only this category?
Dec 12, 2002, 12:53 AM
Enthusiast (706 posts)
Dec 12, 2002, 12:53 AM
Post #2 of 5
Views: 1761
I don't think you could do this with LSQL itself, but you should be able to write some HTML pages that include an adjusted search form, where you manually 'force' searching of only that category.
Your best bet would probably be to copy and paste the search form at the category you want people to search on, and then adjust the HTML of the form to remove the option for search all/search cat and put in a hidden form field to set the option for 'search only this category'.
Hope this helps
All the best
Shaun
Your best bet would probably be to copy and paste the search form at the category you want people to search on, and then adjust the HTML of the form to remove the option for search all/search cat and put in a hidden form field to set the option for 'search only this category'.
Hope this helps
All the best
Shaun
Dec 12, 2002, 1:40 AM
Veteran / Moderator (18441 posts)
Dec 12, 2002, 1:40 AM
Post #3 of 5
Views: 1754
I don't see why it wouldn't be possible. Try the following;
1) Add a new page in your templates folder, something like new_search.html. In it, have a drop down list of the categories (if required I will provide a global that does this in real time)...make sure it is called 'catid'.
2) Then call page.cgi?t=new_search&d=1. That should bring up your new search page, with the drop down list. Then just select the category you want, and it will search only that category
I have done this on another site...and it all works ok. So it shouldn't be too hard ;)
Cheers
Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
1) Add a new page in your templates folder, something like new_search.html. In it, have a drop down list of the categories (if required I will provide a global that does this in real time)...make sure it is called 'catid'.
2) Then call page.cgi?t=new_search&d=1. That should bring up your new search page, with the drop down list. Then just select the category you want, and it will search only that category
I have done this on another site...and it all works ok. So it shouldn't be too hard ;)
Cheers
Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!