Pages

Liquid variables you can use in the Page template

Ryan Marshall avatar
Written by Ryan Marshall
Updated over a week ago

The page object in the Page Template gives you access to the following properties
that can be displayed on the page using Liquid:

page.id
The unique ID of the page in Syngency.

page.title
The title of the page.

page.url
The URL to the page on your website.

page.content
The HTML content of the page.

page.meta_title
The "meta title" of the page – an alternative to the main page title, for SEO use.

page.meta_description
The "meta description" of the page – for SEO use.

page.is_published
A boolean value of the page's published state. If page.is_published is equal to false, it will not be available on your website.

page.published
The timestamp of when the page was published.

page.created_at
The timestamp of when the page was created.

page.updated_at
The timestamp of when the page was last updated.


Example Template:

<!DOCTYPE html>
<html>
<head>   
<meta charset="utf-8">   
<title>{% if page.meta_title %}{{ page.meta_title }}{% else %}{{ page.title }}</title>   
<meta name="description" content="{{ page.meta_description }}">   
<meta name="page:id" content="{{ page.id }}">
</head>
<body>
<article id="post{{ id }}">
<header>
<h1>{{ page.title }}</h1>   
<time>{{ page.published_at | date: '%m/%d/%Y' }}</time>
</header>
<main>
{{ page.content }}
</main>
</article>
</body>
</html>

Did this answer your question?