The request object is available on every page, and contains information regarding the HTTP request that may be useful for serving and rendering the page.
| Name | Type | Description |
| is_valid | Boolean | True if the request is for a Marketpath CMS Page. False if it is a 404 page. |
| domain | String | The requested domain name |
| method | String | The lowercase HTTP method of the current request (eg: "get" or "post") |
| use_ssl | Boolean | True if the request used 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 |
| 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 posted parameters for the current request |
| url | String | The full URL of the current request - including the scheme, the domain, the path, and the query string |
| is_preview | Boolean | True if the request is being served from the preview environment |
| date | time | The full date that the server began processing the request. Using this property prevents the page from being fast-cached, so it is preferable to use the other date-related properties on the request if possible |
| year | Integer | The year that the server began processing the request |
| month | Integer | The month of the year that the server began processing the request (1 through 12) |
| day | Integer | The day of the month that the server began processing the request (1 through 31) |
| hour | Integer | The hour that the server began processing the request (0 through 23) |
| 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 |
| searchterm | String | Only set if the {% search %} method was used and will contain the searchterm used by the {% search %} method |
| is_suspected_bot | Boolean | Will be true if the current request is suspected to be by a bot. Note that this uses a simple method of checking the user agent which is easy for bots to fake, so this should not be used as a definitive test |
| 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. Note that this is a "live" object that may be modified by the {% set_cookie %} and {% unset_cookie %} methods |
Getting request parameters and fetching blog_posts
CopyRequest Origin
CopyLoop Post Parameters
Copy