Page
Page (app/views/pages): Liquid rendered for requests to the URL defined by its slug
type Page implements AdminSharedAttributesInterface {
authorization_policies: [AuthorizationPolicy!]
content: String
content_updated_at: JSONDate!
created_at: JSONDate!
deleted_at: JSONDate
dynamic_cache_expire: Int
dynamic_cache_key: String
dynamic_cache_layout: Boolean
format: PageFormat
handler: PageHandler
html_content: String
id: ID!
layout: String
layout_name: String
manually_managed: Boolean
max_deep_level: Int
metadata: HashObject
physical_file_path: String
redirect_code: Int
redirect_to: String
request_method: PageRequestMethod
response_headers: HashObject
searchable: Boolean
slug: String!
static_cache_expire: Int
subdomain: String
updated_at: JSONDate!
}
Fields
authorization_policies (AuthorizationPolicy)
Authorization policies checked before the page is rendered; all must pass
content (String)
Source of the page as written by the developer: Liquid, optionally with HTML or Markdown
content_updated_at (JSONDate)
Timestamp of when the content last changed (falls back to updated_at), useful as a cache key
created_at (JSONDate)
Timestamp of when the object was created, set automatically by the system
deleted_at (JSONDate)
Timestamp of when the page was soft deleted; null for an existing page
dynamic_cache_expire (Int)
Number of seconds the rendered page is cached for every visitor, keyed by
dynamic_cache_key. Authorization policies are still checked. Use it only when
a cache key cannot be easily determined for fragment caching, for example for
a search results page
dynamic_cache_key (String)
Liquid that evaluates to the cache key used by dynamic_cache_expire. For
example api-reference/graphql/common/objects/page/graphql for a page with
slug abc caches /abc/1 and /abc/2 separately, but returns the same content for
/abc/1/1 and /abc/1/2. When blank, the full URL is used
dynamic_cache_layout (Boolean)
When true, the dynamic cache stores the page together with its layout;
otherwise only the page content is cached. Layouts usually contain data
specific to the visitor, such as the name of the signed in user, hence the
default is false
format (PageFormat)
Format of the response, html by default
handler (PageHandler)
Template language of the content, liquid by default
html_content (String)
Content after conversion to HTML (relevant when the content is Markdown); this is what is rendered
id (ID)
Unique identifier of the object
layout (String)
Name of the layout the page is rendered in, without the layouts/ prefix;
application by default. Liquid allowed. When blank, the page is rendered
without a layout
layout_name (String)
Deprecated, use layout instead
manually_managed (Boolean)
When true, the resource is managed outside of files: pos-cli deploy and sync never overwrite or delete it
max_deep_level (Int)
Maximum number of URL segments the slug resolves, 3 by default. For example
slug abc with max_deep_level 2 resolves /abc, /abc/1 and /abc/2, but not
/abc/2/something
metadata (HashObject)
Free-form data attached to the resource with the metadata key of its file (or the metadata argument of an admin mutation)
physical_file_path (String)
Path of the file the resource comes from, relative to the app directory, for
example views/pages/index.liquid or
modules/my_module/public/views/partials/header.liquid. Identifies the resource
in deploy, sync and admin mutations
redirect_code (Int)
HTTP status of the redirect when redirect_to is set: 301, 302 or 307; 302 when blank
redirect_to (String)
Liquid that evaluates to the path or URL the visitor is redirected to instead
of rendering the page; no redirect when it evaluates to blank
request_method (PageRequestMethod)
HTTP method the page responds to, get by default
response_headers (HashObject)
Liquid that evaluates to a JSON object of headers added to the response
searchable (Boolean)
When true, the rendered content is stored so that pages can be found by it with the content filter of admin_pages
slug (String)
URL path of the page without the leading slash, for example about-us or
users/:id; / for the home page. Defaults to the file path
static_cache_expire (Int)
Number of seconds the rendered page is cached as static HTML. The cache is
used only for visitors who are not signed in, and skips authorization policies
subdomain (String)
When set, the page is served only on hosts that start with this subdomain followed by a dot
updated_at (JSONDate)
Timestamp of when the object was last updated, set automatically by the system
Interfaces
AdminSharedAttributesInterface
Attributes shared by resources that can be deployed from files with pos-cli
(pages, partials, layouts, notifications, authorization policies, schemas, assets etc.)