Provides access to general information about a given page including link to edit or administrate, files and images on the page, whether it is hidden, etc.
Returns the URL to the administration section for the page.
{{ page.admin_link }}
<a href="{{ page.admin_link }}">Page Settings</a>
Returns the page's contents.
{{ page.body }}
Returns the custom date associated with this page (can be changed in the page's settings).
{{ page.custom_date }}
This page's custom date: {{ page.custom_date | date: "%B %e, %Y" }}
Refer to the documentation on date formats.
Returns the page's description.
{{ page.description }}
Returns the URL to the editing mode for the page.
{{ page.edit_link }}
<a href="{{ page.edit_link }}">Edit Page</a>
Returns the embed code if the module is present on the page.
{{ page.embed_code }}
<h3>Video</h3>
{{ page.embed_code }}
Returns a hash of files attached to the page.
{{ page.files }}
{% for file in page.files %}
{% if file.extension == 'mp3' %}
<a href="{{ file.src }}" class="jquery-mp3-player">{{ file.title }}</a>
{% endif %}
{% endfor %}
The attributes available for an individual file are
file.title
, the title the file was given when uploaded;file.filename
, the actual name of the file;file.extension
, the file type;file.src
, the URL to the file.Returns the page's ID.
{{ page.id }}
<div id="page_{{ page.id }}">
<!-- Your content here -->
</div>
Returns the page's name.
{{ page.name }}
<h2>{{ page.name }}</h2>
Returns a full URL to the page.
{{ page.permalink }}
<a href="{{ page.permalink }}">
Permalink to this page
</a>
Returns the URL to the current page.
{{ page.url }}
Returns the name of the page formatted for a URL.
{{ page.urlname }}
A page can have a single liquid page module attached to it. When you add the page module to a page, it will pull in all available liquid partials that you have in your template. On the design tab for your site, you can add more modules under the "page modules" tab.
Returns an array of modules attached to the page.
{% if page.modules contains "blog" %}
The page module called _blog.liquid is attached to this page!
{% endif %}
{% if page.parent.modules contains "blog" %}
Do something special just for blog posts.
{% endif %}
Returns true if the page has the embed code module.
{% if page.has_embed_code? %}
The embed code is present.
{% endif %}
{% if page.has_embed_code? %}
{{ page.embed_code }}
{% endif %}