# CustomPage

An object representing a custom page.

A custom page consists of CustomPageItems that are located in the items property.

# Properties

The properties of the object.

Property Type Description
uid number The unique identifier of a custom page.
name object Name of the custom page, by language.
url object URL to the custom page, by language.
baseName object The base name that is used when generating a URL for the custom page, by language. Unless otherwise specified, baseName is generated from name.
hidden boolean Whether the custom page should be hidden.
pageTitle object The page title, by language.
metaDescription object Text to be used for the HTML meta element named "description", by language.
metaKeywords object Text to be used for the HTML meta element named "keywords", by language.
items array An array of unique identifiers for CustomPageItems.

# Methods

# count

Takes a filter object and returns the number of custom pages found, as an integer.

# Parameters

A filter object specifying which custom pages to count. See Filter objects on the page List selection.

# Example

The request below returns the number of custom pages where the name in English starts with "Terms".

CustomPage.count({
  "/name/en": {
    "startsWith": "Terms"
  }
})

# get

Fetches information about a custom page.

# Parameters

Parameter Description
uid The unique identifier of a custom page.
query Which info to return. See Query language.

# Example

CustomPage.get(9871251, true)

# list

Fetches multiple custom pages as an array of custom page objects.

# Parameters

Parameter Description
query Which info to return. See Query language.
selection Which custom pages to list. See List selection.

# Example

The following request returns the names and URLs of all the custom pages where the names in English start with "Terms":

CustomPage.list({
  "url": {
    "en": true
  },
  "name": {
    "en": true
  }
}, {
  "filters": {
    "/name/en": {
      "startsWith": "Terms"
    }
  }
})

# getSchema

Fetches the JSON Schema which can be used for client-side validation.

# Parameters

The unique identifier of a custom page or null for a new instance.