Try our conversational search powered by Generative AI!

Filtering out the Recycle Bin when searching

Vote:
 
We have a problem with pages in the recycle bin showing up in the search results, is it possible to filter out this part of the tree, and if so, how?
#12335
Aug 22, 2005 11:28
Vote:
 
There are a few ways this could be done. The simpliest way would be to set the source or PageLink of the PageSearch control (assuming this is the standard search template) to the homepage of your site. This would limit the search to items under the homepage (automatically excluding the recycle bin as this sits outside the website). Another way would be to add a filter to the PageSearch by wiring up to the filter event and then removing pages from the search results if they are a descendant of the recycle bin page (There is a reference to the recycle bin in the Configuration class Configuration.Wastebasket). I believe there is a code sample on this site or in the SDK. Cheers, Jeremy
#14084
Aug 22, 2005 23:18
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.