Skip to content

request

The current request.

Available in: Every template.

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.
Liquid
<html dir="{{ request.locale.direction }}" lang="{{ request.locale.iso_code }}">
Output
<html dir="ltr" lang="en">

Since theme platform 1.0.

Was this page helpful?