Search Page - using fixed subject categories

Help
2004-10-08
2013-05-30
  • Bill Marmie

    Bill Marmie - 2004-10-08

    I use a fixed set of subject categories and would like to modify the search page to include an extra search box with a dropdown containing my fixed values.  I've fussed around a bit with no success.

    What (and how and where) do the current text-entry searches get passed?

     
    • Micah Stetson

      Micah Stetson - 2004-10-12

      The search form which appears in opac/index.php and catalog/index.php (this duplication should be eliminated at some point) is submitted to shared/biblio_search.php which constructs an instance of BiblioSearchQuery from classes/BiblioSearchQuery.php.  The code in that class does the actual work of searching and returns the results to biblio_search.php for display.

      If you wanted your subjects to be searched instead of any other search, you could just add a separate form below the current one that had the drop-down box and used its contents as the search terms in a subject search.

      If you're wanting to limit another search by subject, though, you have a bit more work ahead of you.  You'll need to add the subject limiter drop-down to the forms; then modify biblio_search.php to pass that somehow to BiblioSearchQuery; and finally, you must edit the BiblioSearchQuery class to accept the limiter and use it in the SQL queries.

      This isn't terribly hard, but it isn't as easy as it could/should be.  I think we need a more flexible search system, but that will have to come after 0.6.0.

      Micah

       

Anonymous
Anonymous

Cancel  Add attachments