page

This object represents page. On every page view, there exists a propety named page which gives access to current page properties.

language_code

Returns 2-character code for given page, e.g. 'en' for english, 'ru' for russian, 'et' for estonian language.

path

Returns path for given page.

<a href="{{ page.path }}">{{ page.title }}</a>
=> <a href="current/page/path">Current page</a>

Please notice that this is a relative path for this page. We suggest you always to use absolute addresses on your site, which will be generated for you by Edicy assuring less broken links. Absolute path for page can be retrieved by using url variable (see below).

parent

Returns parent page of the current page or nothing if page is already a top-level page. Returned object is also page type of object.

Go <a href="{{ page.parent.url }}">up one level</a>

site_header

Returns site header in given language. Should be used on the top of the page. Use editable tag to make it editable.

<html>
<body>
  <header>{% editable page.site_header %}</header>
  <div>{% content %}</div>
</body>
</html>

site_title

Returns title for site in given language. Should be used when rendering the <title> tag.

<html>
<head>
  <title>{{ page.site_title }}</title>
</head>
...
</html>

title

Returns title for given page

<html><head><title>{{ page.title }}</title></head>...</html>
=> <html><head><title>Current page</title></head>...</html>

url

Returns URL for given page.

<a href="{{ page.url }}">{{ page.title }}</a>
=> <a href="/site_prefix/current/page/path">Current page</a>

created_at

Returns a date when this page was first created. Use date formatting filter to format the date.

updated_at

Returns a date when this page was last updated. Useful for showing "last updated" timestamps. Use date formatting filter to format the date.

This page was last updated at <b>{{ page.updated_at | date : "%d.%m.%Y" }}</b>
=> This page was last updated at <b>09.11.2008</b>