EPiServer 8 - setting a default sort order of child pages

Vote:
 

In EPiServer 6 we could change a default order sort order of child pages using PageTypeBuilder.

Is there something similar in EPiServer 8?

#151867
Edited, Aug 09, 2016 12:13
Vote:
 

Although it's for EPiServer 7 this guide http://www.david-tec.com/2012/06/Comparing-PageTypeBuilder-and-EPiServer-7-Preview-typed-pages-part-3-of-3/ has the following.

Set on the pages/blocks overriden SetDefaultValues

this.Properties["PageChildOrderRule"].Value = EPiServer.Filters.FilterSortOrder.CreatedDescending;

I've not tried it however but the FilterSortOrder enum is still there in EPiServer 9

#151870
Aug 09, 2016 13:02
Vote:
 

Hi,

I can confirm that this works, we use it in projects:

        public override void SetDefaultValues(ContentType contentType)
        {
            this[MetaDataProperties.PageChildOrderRule] = FilterSortOrder.PublishedDescending;
        }

BR,

Marija

#151874
Aug 09, 2016 13:34
Vote:
 

Thanks, this does the trick. I was hoping there is an attribute which I can use to decorate my classes.

#151903
Aug 10, 2016 8:59
This topic was created over six months ago and has been resolved. If you have a similar question, please create a new topic and refer to this one.
* 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.