November Happy Hour will be moved to Thursday December 5th.

"Not"ing compare condition

Vote:
 
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
#12921
Feb 02, 2007 13:12
Vote:
 
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
#15093
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.