Files
liquid/documentation/objects/page.md
2014-07-23 09:43:56 -04:00

1.8 KiB

layout, title, nav
layout title nav
default page
group
Liquid Variables

page

The page object has the following attributes:

{% table_of_contents %}

{% anchor_link "page.author", "page.author" %}

Returns the author of a page.

{% anchor_link "page.content", "page-content" %}

Returns the content of a page.

{% anchor_link "page.handle", "page-handle" %}

Returns the handle of the page.

{% anchor_link "page.id", "page-id" %}

Returns the id of the page.

{% anchor_link "page.published_at", "page-published_at" %}

Returns the timestamp of when the page was created. Use the date filter to format the timestamp.

{% anchor_link "page.template_suffix", "page-template_suffix" %}

Returns the name of the custom page template assigned to the page, without the page. prefix nor the .liquid suffix. Returns nil if a custom template is not assigned to the page.

Input

{% highlight html %}{% raw %} {{ page.template_suffix }} {% endraw %}{% endhighlight %}

Output

{% highlight html %}{% raw %} contact {% endraw %}{% endhighlight %}

{% anchor_link "page.title", "page-title" %}

Returns the title of a page.

{% anchor_link "page.url", "page-url" %}

Returns the relative URL of the page.

Input

{% highlight html %}{% raw %} {{ page.url }} {% endraw %}{% endhighlight %}

Output

{% highlight html %}{% raw %} /pages/about-us {% endraw %}{% endhighlight %}