Skip to content

Sort Clause reference

Sort Clauses are the sorting options for Content and Location Search.

Capabilities of individual Sort Clauses can depend on the search engine.

All Sort Clauses can take the following optional argument:

  • sortDirection - the direction of the sorting, either Query::SORT_ASC (default) or Query::SORT_DESC

Sort Clauses

Sort Clause Sorting based on Search type
ContentId Content items' ID Content and Location
ContentName Content names Content and Location
DateModified The date when content was last modified Content and Location
DatePublished The date when content was created Content and Location
Depth Location depth in the Content tree Location only
Field Content of one of Content item's Fields Content and Location
Id Location ID Location only
IsMainLocation Whether a Location is the main Location of a Content item Location only
MapLocationDistance Distance between the location contained in a MapLocation Field and the provided coordinates Content and Location
Path PathString of the Location Location only
Priority Location priority Location only
SectionIdentifier ID of the Section content is assigned to Content and Location
SectionName Name of the Section content is assigned to Content and Location
Visibility Whether the Content item is visible or not Location only
Read the Docs