Hi,
We're having a slight sorting issue with EpiServer.
The thing is, we are sorting some stuff in a multi-language context.
When the language is SV, it looks like this:
- Alingsås
- Bengtsfors
- Stockholm
- Åre
(standard swedish sort order)
When the language is EN, it looks like this:
- Alingsås
- Åre
- Bengtsfors
- Stockholm
Well, it seems logical because it's sorted with some english sort order (Å = A, Ö = O, Å = A und zu weiter).
But, our client would like the sort order to remain scandinavian style even if the language is english.
Is there a way to accomplish this? Filter?
This is a snippet of code that loops and builds up the list:
foreach (PageData d in new PageList().GetChildren(CurrentPage.PageLink))
Is there any solution to this?
I have a similar sorting issue but cant find any good code for PageDataCollection.Sort !
Im trying to list pages according to their sort order as you see them in edit mode but when I use:
PageDataCollection oPages = Global.EPDataFactory(Configuration.StartPage);
I get them in alphabetical order!
/John
Try this:
using EPiServer.Filters;
...
FilterSort sorter = new FilterSort(FilterSortOrder.PublishedDescending);
// This will sort an existing collection of pages
sorter.Sort(oPages);
foreach (PageData d in new PageList().GetChildren(CurrentPage.PageLink))