has_prev ()

True if there is a previous record in the parent's list of children.

If the parent record has pagination enabled, then use the pagination query to filter and order the children. Otherwise, the parent's standard configuration for children is used. See the pagination guide and the page order guide.

Example

{% if this.has_prev() %}
  <a href="{{ this.get_siblings().prev_page|url }}">previous</a>
{% else %}
  <p>This is the first entry.
{% endif %}

See also: has_next and get_siblings.

Comments