Pagination for Results

The results retrieved from the Prismic content repository will automatically be paginated. Here you will find an explanation for how to modify the pagination parameters.

Before reading

This page assumes that you're using the Vue.js starter project or that you have setup your project as explained on the Integrating with existing project page.

pageSize

The pageSize option defines the maximum number of documents that the API will return for your query. Default is 20, max is 100.

Set the pageSize option as shown in the example below.

Example: This demonstrates how to query all of the documents of the custom type "recipe", allowing 100 documents per page.

Copy
this.$prismic.client.query(
  this.$prismic.Predicates.at('document.type', 'recipe'),
  { pageSize : 100 }
).then((response) => {
  // response is the response object, response.results holds the documents
});

page

The page option defines the pagination for the result of your query. If unspecified, this field defaults to "1", corresponding to the first page or results.

Set the page option as shown in the example below.

Example: This demonstrates how to query all of the documents of the custom type "recipe" limited to 50 recipes per page, showing the third page of results.

Copy
this.$prismic.client.query(
  this.$prismic.Predicates.at('document.type', 'recipe'),
  { pageSize : 50, page : 3 }
).then((response) => {
  // response is the response object, response.results holds the documents
});