ThemesContexts
Page
The page context in a StoreOS Fluid theme, with its route, widgets, the page object and an example widget.
The page context renders a content page the merchant wrote, such as About or Shipping.
Route
/pages/:slug
:slug is the page's handle, such as /pages/about. A slug that matches no page isn't rendered by the theme.
Widgets
The widgets listed under pages.page in the theme document.
{ "pages": { "page": ["page-header", "rich-text"] } }Data
| Object | Contents |
|---|---|
page | The page being viewed. See page |
page_title | The page's title |
page_description | A short description made from the start of the page's content |
Plus the data on every page.
page.content is HTML written by the merchant. It's printed as-is, so don't add escape to it.
Example
{% comment %} widgets/page-content.fluid {% endcomment %}
<article class="page">
<h1>{{ page.title }}</h1>
{% if page.image %}
<img src="{{ page.image | image_url }}" alt="{{ page.image.alt }}">
{% endif %}
<div class="page-content">{{ page.content }}</div>
</article>