SearchDataSource

Vote:
 
Hello everyone, I'm using the SearchDataSource-control that is bind up with a asp:repeater (from the publicPackage). Working perfectly, but the problem is that I have a globalized website and it seems to search thru both language's, but only generating links for the english version. In 4.62 I used the following code: [code] if ((bool)Global.EPConfig["EPfEnableGlobalizationSupport"] && !AllLanguages.Checked ) { ArrayList languageBranch = new ArrayList(); languageBranch.Add( LanguageContext.Current.CurrentLanguageBranch ); SearchResults.LanguageBranches = languageBranch; } [/code] Tho, LanguageContext seems to be removed from version 5, any idea on how to sort this out?
#15888
Mar 25, 2008 19:07
Vote:
 
I will need the same option to, to search only one of several site languages. Viktor, did you find some examples on how to use SearchDataSource?
#16574
Mar 25, 2008 19:09
Vote:
 
I'll let you know if I do, still nothing yet tho.
#16575
Mar 25, 2008 19:09
Vote:
 
Hi! The SearchDataSource class has a property called LanguageBranches that takes a comma separated list of the language branches to be searched in. Set this to CurrentPage.LanguageBranch to search only the current language.
#16576
Mar 25, 2008 19:09
Vote:
 
Yes, i've read the SDK and tried exactly that at both runtime and in the aspx-file. The property "Languagebranches" in the SearchDataSource is Read-only. I'm probably missing out on some of the new stuff in EPiServer 5, but i just couldn't manage to sort it out. Could you perhaps show me an example?
#16577
Mar 25, 2008 19:09
This thread is locked and should be used for reference only. Please use the Episerver CMS 7 and earlier versions forum to open new discussions.
* 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.