Try our conversational search powered by Generative AI!

"Not"ing compare condition

Hi Is there a way by which I can not the compare condition. e.g I want all the pages with PageTypeNames NOT startring with word "Area"? Cheers Vish
Feb 02, 2007 13:12
You can do that filter yourselt in a few lines of code. public class Filter { public static void PagTypeFilter(object sender, EPiServer.Filters.FilterEventArgs e) { for(int i = 0; i < e.Pages.Count; i++) { if(!e.Pages[i].PageTypeName.StartsWith("Area")) continue; e.Pages.RemoveAt(i); i--; } } } /HAXEN
Feb 09, 2007 11:19
* 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.