{{ request }}

{{ request }}

The request object is available on every page, and contains information regarding the request that may be useful for serving and rendering the page.

Properties

Field Type Description
object_type string Will always be "request".
is_valid true/false True if the request is for a Marketpath CMS Page. False if it is a 404 page.
domain string The domain of the current request.
method string The lowercase HTTP method of the current request (eg: "get" or "post").
use_ssl true/false True if the page is being loaded via the 'https' scheme.
path string The part of the URL after the domain, including the leading '/' but not including the query string parameters or hash.
query_string string Everything after the '?' character in the URL (excluding the hash, of course).
query_params query_params Object containing all of the query string parameters for the current page.
post_params post_params Object containing all of the HTTP post parameters for the current page.
url string The full URL of the current page - including the scheme, the domain, the path, and the query string.
year int The year that the server began processing the request.
month int The month of the year that the server began processing the request (1 through 12).
day int The day of the month that the server began processing the request (1 through 31).
hour int The hour that the server began processing the request (0 through 23).
date date The full date that the server began processing the request.
timezone string The name of the current timezone used to display dates (eg: PST or PDT).
timezone_full string The full name of the timezone used to display dates (eg: "America/Indianapolis").
user_agent string The User Agent supplied by the current request.
headers headers Object containing all of the headers sent with the current request.
cookies cookies Object containing all of the cookies for the current request.
is_preview true/false True if the request is being served from the preview environment. False if the request is being served from the live environment.