Exclude nodes with a specific nodeTypeAlias from searchresult
This ain't a bug actually, but I'll give it a shot anyway. I use this excelent search-function on one of my sites, but I wonder if it's possible to exclude nodes with a certain nodeTypeAlias from the search results.
My problem is, that I have a login-node, a 404-node and a couple of other nodes, that I don't want the user to see in the searchresult. Is it possible to exclude those nodes in some way?
You can hide those nodes from XSLTsearch by setting the umbracoNaviHide property.
Or, you could customize XSLTsearch to ignore certain document types using the instructions in this blog post:http://blog.percipientstudios.com/2009/4/7/customizing-xsltsearch.aspx
It's not available oob afaik, but you can easily modify the source to exclude the nodes you don't want to appear in your search results, i'm thinking of of a couple of options:
-Exclude the nodes in the xslt search file itself (look for the possibleNodes variable)
-Add an extra property to your documents (excludeFromSearchResults) and also the check on that property in the possibleNodes variable)
Exclude nodes with a specific nodeTypeAlias from searchresult
This ain't a bug actually, but I'll give it a shot anyway. I use this excelent search-function on one of my sites, but I wonder if it's possible to exclude nodes with a certain nodeTypeAlias from the search results.
My problem is, that I have a login-node, a 404-node and a couple of other nodes, that I don't want the user to see in the searchresult. Is it possible to exclude those nodes in some way?
Thanks
/Kim A
You can hide those nodes from XSLTsearch by setting the umbracoNaviHide property.
Or, you could customize XSLTsearch to ignore certain document types using the instructions in this blog post:http://blog.percipientstudios.com/2009/4/7/customizing-xsltsearch.aspx
cheers,
doug.
It's not available oob afaik, but you can easily modify the source to exclude the nodes you don't want to appear in your search results, i'm thinking of of a couple of options:
-Exclude the nodes in the xslt search file itself (look for the possibleNodes variable)
-Add an extra property to your documents (excludeFromSearchResults) and also the check on that property in the possibleNodes variable)
Hope this helps.
Regards,
/Dirk
That's just great Doug. Looks like this is exactly what I need. Thanks :)
@Dirk
Ahh didn't see your answer before I answered. But your answer is great as well, and would have helped me also. Thanks, 1+.
It appears @nodeTypeAlias is no longer an accessible property of the item I'm using name()= 'homepage' instead.
is working on a reply...