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

OrderBy

Creates an ascending sort order on a custom field.

public CrownPeak.CMSAPI.SortOrder OrderBy(String)

Parameters

NameDescriptionType
name The 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.OrderBy("start_date");
             List<Asset> list = Asset.Load("/Site/About Us").GetFilterList(filterParams);    
             
             

Connect with Crownpeak