Gossamer Forum
Home : Products : DBMan SQL : Discussion :

search option query

Quote Reply
search option query
I have customised my search_results to display either in French or English versions. In search calls, a parameter ...&lang=1 triggers french displays, of the type:

db.cgi?db=iris&do=search_results&keyword=*&ClassAbrev=TB&ClassAbrev-opt==&fm=long&mh=15&page=1&uid=default&Valid=3&lang=1

All templates work fine, with one exception. When a user does his own search, after I have offered him a French version customised search form with:

db.cgi?db=iris&do=search_form&lang=1&uid=default

if he clicks on search and will always get his results in English. I have investigated the search_options template possibilities but none seem to meet the requirement. Another solution would be to output the result to a different search_results template, and another thread on a similar subject involved modification of Home.pm - which I'll stay away from without expert help. Any suggestions?

(By way of thanks to TheStone for his great help, this site is now open (despite the above flaw) to all those who love irises)

Last edited by:

TheStone: May 30, 2003, 9:36 AM
Quote Reply
Re: [charly] search option query In reply to
You can pass in t=template_set which is the template set you want to use.

E.g.: I assume that you have a default_fr template, so the search url should be:

db.cgi?db=table&do=search_form&t=default_fr

You also need to add a hidden object below into the search form as well

<input type="hidden" name="t" value="<%if t%><%t%><%endif%>">

Hope that helps.

TheStone.

B.