Five New Optimizely Certifications are Here! Validate your expertise and advance your career with our latest certification exams. Click here to find out more
AI OnAI Off
Five New Optimizely Certifications are Here! Validate your expertise and advance your career with our latest certification exams. Click here to find out more
Hi,
On the year containers, you can set to sort children by index instead of publish date etc. Then on each month container you set a sort index.
For the year container:
public override void SetDefaultValues(ContentType contentType)
{
base.SetDefaultValues(contentType);
// First evauluate if this is year container, then set this property
ChildSortOrder = FilterSortOrder.Index;
}
For month:
public override void SetDefaultValues(ContentType contentType)
{
base.SetDefaultValues(contentType);
int month = GetMonth();
SortIndex = month;
}
Adjust the month value to sort ascending or descending. Index will always sort by ascending.
Hello fellas!
I have created a automatic map structure for a pagetype called news through a event listner. The structure is based on (Type/year/month/news). However I have problems solving the sorting for the month folders. I want it to be sorted by month (January, February, Mars etc), in the picture you can see the news containers are in the wrong order. I discovered there is built in functions for sorting by created date and alfaphatic order. But I haven't found anything for custom sorting. I have added a field in the NewsContainers for the sort order. Do someone know how to handle custom sorting? Let me know if I need to provide more info.

NewsContainer: