Reversed FilterCompareTo

Vote:
 
Hallo everyone, I have some question, but my splitting them up in 3 different posts to make it easier. I’m sorry if these questions have been answered before, but I couldn’t find any solutions for them here while searching. Question nr 1: I have a NewsList that I’m are going to use to present data from 3 different data sources. To display them all works good and add a filter (FilterCompareTo) to the list to show only some of the data works perfect :) But the problem is that I sometimes want to show more data. My list is divided in A,B,C,D and E list. And sometime I want to show A, B, C together. So instead of saving the data from list A as I do with FilterCompareTo I want to remove D and E or save 3 different parts. Hope you understand my problem :) I found some real old post about this on the forum, but no solutions for it.
#12975
Mar 25, 2008 18:35
Vote:
 
Hi Henrik, this is not an anwer to your question, rather I would like to know how you solved showing news from source A, B and C. I have a customer that wants a nested list showin all news. That means retrieving news from 19 different newslists and ordering them by date, newest first. Any good suggestions on how to do this would be much appreciated! :-)
#15190
Mar 25, 2008 18:46
Vote:
 
Hallo :) (I will look in your answer on my other question towmorrow, thanks for that :)) This is how I did it. Where dyn_event_list1 is a dynamic property. Workes the same to use PageLink="561" (or what your id nr is) (I think ;)). It adds all the news sources in to one singel source named Event3.
#15191
Mar 25, 2008 18:46
Vote:
 
Might give you more control if you do it in codebehind. Example: EPiServer.Core.PageDataCollection pages = new EPiServer.Core.PageDataCollection(); pages.Add(GetPages("dyn_event_list1")); pages.Add(GetPages("dyn_event_list2")); pages.Add(GetPages("dyn_event_list3")); EPiServer.Filters.FilterSort sort = new EPiServer.Filters.FilterSort(EPiServer.Filters.FilterSortOrder.ChangedDescending); sort.Sort(pages); return pages; } private EPiServer.Core.PageDataCollection GetPages(string propertyName) { return EPiServer.Global.EPDataFactory.GetChildren((EPiServer.Core.PageReference)CurrentPage[propertyName]); } /HAXEN
#15192
Mar 25, 2008 18:46
* 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.