London Dev Meetup Rescheduled! Due to unavoidable reasons, the event has been moved to 21st May. Speakers remain the same—any changes will be communicated. Seats are limited—register here to secure your spot!

SearchDataSource

Vote:
0
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
Nov 22, 2007 9:40
Vote:
0
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
Nov 22, 2007 16:57
Vote:
0
I'll let you know if I do, still nothing yet tho.
#16575
Nov 23, 2007 8:41
Vote:
0
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
Nov 30, 2007 8:17
Vote:
0
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
Nov 30, 2007 9:50
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.