Documentation > CMS Template API Library > SortOrder > OrderBy(AssetPropertyNames)
OrderBy
Creates an ascending sort order on a built-in field.
public CrownPeak.CMSAPI.SortOrder OrderBy(AssetPropertyNames)
Parameters
Name | Description | Type |
---|---|---|
name | The name. | CrownPeak.CMSAPI.AssetPropertyNames |
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(AssetPropertyNames.Type); List<Asset> list = Asset.Load("/Site/About Us").GetFilterList(filterParams);