Seems like when I think I know how this is going to work, something happens that's different from what I expect!
I have a search script that uses the $path variable to limit the scope of the results by exporting $path at the top of the script. However, the showform section doesn't propagate the path for people who want to search again. So, I added,
I also kept the original line, without the $path definition, changing the text to "Search entire site"
During testing, I got the two search boxes as expected, but BOTH limited the search results to the specified path. I would expect the original line to search the entire site, as it did before I made this change.
"lines" are not special in HTML forms. Everything on the form is sent back to the server when the user hits submit. In vortex the special variable name "cmd" can be used on submit buttons to get it to enter at the named function instead of the default of "main". If you give your "Search entire site" button the name "cmd" and create a function in the search script called "Search entire site" pressing that button will go to the new function. Then that function should set path to empty and then call main
<a name="Search entire site">
<$path=>
<main>
</a>
The other way to handle it would be to use a select list instead of a hidden input separate button. The select would be called path. The entire site option would have a value of "" and the section option would have the path value you have now.
Ok. Both search boxes were in the same <form></form>.
Is it possible to specify more than one path? We have virtual hosts set up for some of our directories. The search index contains references to the virtual host and to the directory.
I want to limit the search scope to their directory. Is there a way to specify two paths?
I want the search with limited scope to find the urls for that department, regardless of what the path is.
We want the various departments to be able to create their own searches, so $path is defined in the html form that calls texis/webinator/search/. My knowledge of html tells me that the following won't work:
You are correct in your last statement about path2.
If www.dept.site.com is just an alias for the same content under www.site.com/department/ you might consider walking it just one way or the other rather than having the confusing variation in the database.