What you want to change is the Display::setVariables() method. If you limit your changes to the section that generates the string that's added to the "METHOD" variable, it shouldn't affect anything else. If you really want to play it safe, you can leave the existing code as-is, and just add a similar section to the code to generate a different template variable, e.g. "RADIOBUTTON_METHOD", as a series of radio buttons. You could then change the follow-up search forms, in common/*.html, to use the new template variables, leaving the old variables still available for use by anyone who prefers them. You could also do likewise with the "FORMAT" and "SORT" variables. A third option, which may be even more preferable, would be to find the section of this module that deals with the build_select_lists attribute, and make a similar section for dealing with a new build_radio_lists attribute, to make a radio button list from any input parameter. You could then add this attribute to your search configuration file, with the appropriate settings for generating the radio buttons for followup match_method selection, and use the generated template variable in your common/*.html forms. If you pursue this option, please share your patch to Display.cc with the list, as others may find this quite useful as well. According to Elsa Chan: > If I change the C++ code in the two files you mentioned, will it affect > anything else? Is there anything else I should be aware of before > preceeding with this option? Thanks. > > Elsa > > -----Original Message----- > From: Gilles Detillieux [mailto:[EMAIL PROTECTED]] > Sent: Wednesday, July 19, 2000 6:12 PM > To: [EMAIL PROTECTED] > Cc: [EMAIL PROTECTED] > Subject: Re: [htdig3-dev] drop down menu > > > According to Elsa Chan: > > I want to change the drop down menu for match_method to radio buttons > > instead. What files do I have to make the changes in? > > You can change this in your search.html form. The problem is that in the > followup search forms in header.html (or wrapper.html), nomatch.html and > syntax.html, it uses a template variable that is set automatically by > htsearch to be a select list (i.e. a drop down menu). There's no way, > without changing the C++ code in htsearch/Display.cc, to change these > select lists to radio buttons. You have the option, in the followup > search forms, not to use the template variables that htsearch generates, > and instead use hard-coded radio buttons there too, just as in your > initial search form, but then user selections won't get propagated to > the followup forms. -- Gilles R. Detillieux E-mail: <[EMAIL PROTECTED]> Spinal Cord Research Centre WWW: http://www.scrc.umanitoba.ca/~grdetil Dept. Physiology, U. of Manitoba Phone: (204)789-3766 Winnipeg, MB R3E 3J7 (Canada) Fax: (204)789-3930 ------------------------------------ To unsubscribe from the htdig mailing list, send a message to [EMAIL PROTECTED] You will receive a message to confirm this.
