Redirecting…

Page

ID

Returns the page's ID.

Usage

{{ page.id }}

Example

<div id="page_{{ page.id }}">
  <!-- Your content here -->
</div>

Name

Returns the page's name.

Usage

{{ page.name }}

Example

<h2>{{ page.name }}</h2>

Description

Returns the page's description.

Usage

{{ page.description }}

Meta

Returns an HTML meta tag with the page's description as its contents.

Usage

{{ page.meta }}

Example

<!DOCTYPE html>
<html>
  <head>
    {{ page.meta }}
  </head>
  <body></body>
</html>

URL

Returns the URL to the current page.

Usage

{{ page.url }}

URL Name

Returns the name of the page formatted for a URL.

Usage

{{ page.urlname }}

Permalink

Returns a full URL to the page.

Usage

{{ page.permalink }}

Example

<a href="{{ page.permalink }}">
    Permalink to this page
</a>

Level

Returns the depth of the page in the navigation.

Usage

{{ page.level }}

Body

Returns the page's contents.

Usage

{{ page.body }}

Edit Link

Returns the URL to the editing mode for the page.

Usage

{{ page.edit_link }}

Example

<a href="{{ page.edit_link }}">Edit Page</a>

Admin Link

Returns the URL to the administration section for the page.

Usage

{{ page.admin_link }}

Example

<a href="{{ page.admin_link }}">Page Settings</a>

Root?

Returns true if the page is a root page.

Usage

{% if page.root? %}
  This is the root page.
{% endif %}

Root

Returns the root ancestor of the page.

Usage

{{ page.root }}

Example

<a href="{{ page.root.url }}">
  Go back to {{ page.root.name }}
</a>

Has Children

Returns true if the page has any sub-pages (whether or they be hidden).

Usage

{% if page.has_children? %}
  This page has sub-pages.
{% endif %}

Has Visible Children

Returns true if the page has any visible sub-pages.

Usage

{% if page.has_visible_children? %}
  This page has visible sub-pages.
{% endif %}

Has Hidden Children

Returns true if the page has any hidden sub-pages.

Usage

{% if page.has_hidden_children? %}
  This page has hidden sub-pages.
{% endif %}

Children

Returns the children of the page as a hash.

Usage

{{ page.children }}

Example

{% if page.has_children? %}
  This page has {{ page.children.length }} sub-pages.
{% endif %}

Visible Children

Returns the sub-pages of the page which are visible as a hash.

Usage

{{ page.visible_children }}

Example

{% if page.has_visible_children? %}
  This page has {{ page.visible_children.length }}
{% endif %}

Hidden Children

Returns the sub-pages of the page which are hidden as a hash.

Usage

{{ page.hidden_children }}

Example

{% if page.has_hidden_children? %}
  This page has {{ page.hidden_children.length }}
{% endif %}

Has Parent

Returns true if the page has a parent page.

Usage

{% if page.has_parent? %}
  This page has a parent-page.
{% endif %}

Parent

Returns the parent-page.

Usage

{{ page.parent }}

Example

<a href="{{ page.parent.url }}">Parent</a>

First Child

Returns the first descendant of the page.

Usage

{{ page.first_child }}

Example

<a href="{{ page.first_child.url }}">Go to the beginning</a>

Last Child

Returns the last descendant of the page.

Usage

{{ page.last_child }}

Example

<a href="{{ page.last_child.url }}">Go to the end</a>

Embed Code

Returns the embed code if the module is present on the page.

Usage

{{ page.embed_code }}

Example

<h3>Video</h3>
{{ page.embed_code }}

Has Embed Code

Returns true if the page has the embed code module.

Usage

{% if page.has_embed_code? %}
  The embed code is present.
{% endif %}

Example

{% if page.has_embed_code? %}
  {{ page.embed_code }}
{% endif %}

Breadcrumbs

Returns an HTML list with CSS classes for styling of all the parents of the page.

Usage

{{ page.breadcrumbs }}

Example

{{ page.breadcrumbs }}

<!-- The output of the above line will be similar to this -->
<ul class="breadcrumbs">
  <li class="some-more"><a href="/locations">Locations</a></li>
  <li class="some-more"><a href="/locations/canada">Canada</a></li>
  <li class="one-more"><a href="/locations/canada/british-columbia">British Columbia</a></li>
  <li class="last-one">Victoria</li>
</ul>

Is Hidden

Returns true if the page is hidden from the navigation (can be changed in the page's settings).

Usage

{% if page.is_hidden? %}
  This page is hidden.
{% endif %}

Example

{% if page.is_hidden? %}
  <p>This page is hidden.</p>
{% endif %}

Custom Date

Returns the custom date associated with this page (can be changed in the page's settings).

Usage

{{ page.custom_date }}

Example

This page's custom date: {{ page.custom_date | date: "%B %e, %Y" }} 

Refer to the documentation on date formats.