Documentation > CMS Template API Library > SortOrder > ThenBy(String)

ThenBy

Adds an additional custom field to the current sort order in ascending order.

public CrownPeak.CMSAPI.SortOrder ThenBy(String)


Returns

Itself.

Parameters

NameDescriptionType
name The field name. System.String

Code Example

C#

Sample:

            
             int search = 1630;
             FilterParams filterParams = new FilterParams();
             filterParams.Add(AssetPropertyNames.TemplateId, Comparison.Equals, search);    
             filterParams.Limit = 10;
             filterParams.SortOrder = SortOrder.ThenBy("start_date");
             List<Asset> list = Asset.Load("/Site/About Us").GetFilterList(filterParams);    
             
             

Connect with Crownpeak