Hi, I *finally* found some time today to update the search. I'm sending the patch to Stas in separate email.
The main change is that searches can be limited to sections of the document tree. That means the various sections can have a a search field with a checkbox to say "__ Search this section only". Here's some notes: - The search box currently uses absolute URL pointer to the search CGI script. It would be great if that could be a relative link, and adjusted depending on the depth of the page the box is on. - The search box doesn't need to be shown on the swsih.cgi page, of course. - Why not make the "search" text a button? Then the initial "Press enter" would not be required. Or use (cough!) javascript to erase the box on entry. No, ignore that. - You need to set an environment variable to tell the spider the URL. On my machine that's export MODPERL_SITE='http://localhost:4000/dst_html' Then it will start spidering at: http://localhost:4000/dst_html/index.html But that's also used to extract out the "section" with the expression $uri =~ m!$ENV{MODPERL_SITE}{/([^/]+)/.+$! where $1 is used as the section name. So it's just using the initial directory name for the section. On the swish.cgi page it now lists a collection of checkboxes so you can limit searches to those sections. What that means is the forms on the pages can have a checkbox to limit to just the section that page is located on: Search only this section: <input type="checkbox" name="sbm" value="about" /> Where "about" is substituted when generating the site. (Can you do that Stas?) That make sense? Oh, the setup of the checkboxes on the swish.cgi page (where search results are show) are defined in .swishcgi.conf. The labels can be defined for each of the checkbox options by: labels => { about => 'About mod_perl', doc => 'Documentation', stories => 'Sucess Stories', support => 'Support', }, Can also change to select list in that file, if you like that better than check boxes. Also need to update the search.tt file to match up colors better and/or make use of our style sheet. Oh, BTW -- my mind isn't working, Stas. In search.tt I do this: [% PROCESS search_form %] [% PROCESS nav_bar %] [% PROCESS results_list %] [% IF search.navigation('hits') > search.config('page_size'); PROCESS nav_bar; END %] Can I (should I) capture the output from PROCESS nav_bar so I'm not PROCESSing two times? Do I need to wrap the PROCESS in a BLOCK and capture that? Thanks, -- Bill Moseley mailto:[EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]