The line you changed just determines whether to display the options for global or local search at all but it does not change what the is posted to the search script.
I think that you have to make sure that the value for the radiobuttons is set to 150. This way the search script knows that you just want to search below the node with the id 150.
I suspect that the line with the radiobutton does not appear in the html produced by the template and thus is not posted to the search function.
You need no make sure that the variable SubTreeArray[] is posted with the value you want. So if you want to give your user the option to specify the subtree they want to search your form would need to look something like this:
If you want to search only one subtree there is no need for any readio buttons or selectboxes. So we can submit the desired node in a hidden formfield:
But now it only returned the front page as a result. I had a bit of a play with the content (I'm not the content creator, I'm just setting up the CMS) and determined that this was because the content had all been created elsewhere in the node tree but then published at this location as well. I went in and set the 'main' location for a couple of the articles to the sub-nodes of 150 and sure enough, the search returned them in the results. However, the way that my friend wants to use the CMS is to create articles at one point and then publish them at multiple locations, so they will appear at different points on different sites (if that makes sense).
So (hopefully) one last question - Is it possible to get the search to return results from articles in the subtree even if that isn't the 'main' location of those articles?
Thanks again for all your help. If you're ever in England I definitely owe you a few drinks!
As for your question with the main_node, unfortunately there does not seem to be an solution yet. Check this thread: http://ez.no/community/forum/setup_design/searching_subtrees_only_works_for_main_locations
Next week, I'll release a version of the Lucene based plugin which solves this issue. If you can install a servlet engine and the PHP-Java bridge you may consider using our plugin instead.
Claudia - Thanks for all your help, you've been brilliant. I've temporarialy changed the 'main' node for all the content so at least have the search working correctly for this site.
Paul, I'll have a look at what's involved with installing the servlet engine and PHP-Java bridge and keep an eye out for when you release the Lucene Plugin. Thanks for the 'heads-up'.
Tony.
You must be logged in to post messages in this topic!