Creates a query to retrieve a list of categories.
The Query Categories method builds a query to retrieve a list of up to 100 categories per language, and returns a CategoriesQueryBuilder
object.
The response contains the query definition, which is typically used to run the query using the find()
method.
You can refine the query by chaining CategoriesQueryBuilder
methods to the query. CategoriesQueryBuilder
methods enable you to sort, filter, and control the results that Query Categories returns. Any methods chained to the Query Categories method are applied in the order that they are called.
Query Categories runs with these CategoriesQueryBuilder
defaults, which you can override.
The following CategoriesQueryBuilder
methods are supported for Query Categories. For a full description of the Categories
object, see the response for the items
property in CategoriesQueryResult
.
PROPERTY | SUPPORTED FILTERS & SORTING |
---|---|
_id | eq() ,ne() ,in() ,ascending() ,descending() |
label | eq() ,ne() ,startsWith() ,exists() ,in() ,ascending() ,descending() |
postCount | eq() ,ne() ,lt() ,le() ,gt() ,ge() ,in() ,ascending() ,descending() |
title | eq() ,ne() ,startsWith() ,exists() ,in() ,ascending() ,descending() |
displayPosition | eq() ,ne() ,lt() ,le() ,gt() ,ge() ,in() ,ascending() ,descending() |
translationId | eq() ,ne() ,exists() ,in() |
language | eq() ,ne() ,exists() ,in() ,ascending() ,descending() |
slug | eq() ,ne() ,exists() ,in() ,ascending() ,descending() |
Options specifying which fields to return.
This method doesn't return any custom errors, but may return standard errors. Learn more about standard Wix errors.