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?
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.
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?