Try our conversational search powered by Generative AI!

Criteria to filter a language branch

Vote:
 

I'm trying to filter out the pages belonging to the current language branch but when I add the criteria I get an empty result. How come this one is not ok?

criterias.Add(BlogUtil.CreateCriteria(CompareCondition.Equal, "LanguageBranch", PropertyDataType.String, CurrentPage.LanguageBranch, true));

#40940
Jun 23, 2010 15:19
Vote:
 

Hi Peter

Us one of the overloads for the FindPagesWithCriteria method. One of them takes a language branch. See: http://www.frederikvig.com/2009/10/episerver-findpageswithcriteria-and-findallpageswithcriteria/

#40941
Jun 23, 2010 16:23
Vote:
 

Almost to easy! :) Thanks!!

#40949
Jun 24, 2010 7:56
This topic was created over six months ago and has been resolved. If you have a similar question, please create a new topic and refer to this one.
* 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.