request
The current request.
Available in: Every template.
Properties
Section titled “Properties”| Property | Type | Description |
|---|---|---|
request.host |
string | Host name. |
request.path |
string | Path. |
request.origin |
string | Scheme and host (https://…). |
request.locale |
object | Current language: iso_code, name, endonym_name, primary, root_url, direction (ltr or rtl). |
request.page_type |
string | Template type (index, product, collection…). |
request.design_mode |
boolean | True in the theme editor. |
request.visual_preview_mode |
boolean | True in an editor preview. |
Example
Section titled “Example”<html dir="{{ request.locale.direction }}" lang="{{ request.locale.iso_code }}"><html dir="ltr" lang="en">Compatibility
Section titled “Compatibility”Since theme platform 1.0.
Was this page helpful?

