Skip to content

Instantly share code, notes, and snippets.

@bobdenotter
Last active December 17, 2015 08:18
Show Gist options
  • Save bobdenotter/5579025 to your computer and use it in GitHub Desktop.
Save bobdenotter/5579025 to your computer and use it in GitHub Desktop.
How to display pages '5 through 9'..
{% setcontent records = "pages/latest/10" limit %}
{# use 'for' to iterate over the records. #}
{% for record in records %}
{# we only want '5 to 9' #}
{% if loop.index >= 5 and loop.index <= 9 %}
<article>
<h2><a href="{{ record.link }}">{{ record.title }}</a></h2>
{{ record.introduction }}
</article>
{% endif %}
{% enfdor %}
@Mikescops
Copy link

You made a little error, it's "pages/latest/10"

@bobdenotter
Copy link
Author

Fixed, thanks! :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment