I've built our site by modifying the public templates and I've got a little problem with the search function. It performs the search globaly and not just in the language branch that it concernes. I thoght removing the global-statement from SearchDataSource.SearchLocations = "~/Global/,~/Documents/,~/PageFiles/"; would do the trick but it still gets pages from the other branches. Is there any other place in which the global search can be removed?
Set the LanguageBranches property of the SearchDataSource (it's a comma separated list of language branch strings ("en" etc.)).
I totally missed that property. Thanks for the fast reply!
i am new to this concept of using search based on language.........how can i search based on language? If i stand in English language and if i type some text in search control it displays the results belonging to diff countries that match that text......how can i filter those results?
Can anyone figure it out......Suggestions appreciable.....
Thanks in advance....
Add SearchDataSource.LanguageBranches = Locale((PageBase)Page); to your SearchDataSource.
i cant abe to add Locale keyword in my code. It required any name spaces?
Are you trying to add it in a page template or a web control?
I am adding it in .cs file of aspx page......
Then try CurrentPage.LanguageBranch.ToString(); instead.
Thank a lot......
It is working fine......once again thanks to u.......
Glad it worked out!