Skip to content

Instantly share code, notes, and snippets.

@adamfairholm
Last active December 16, 2015 13:49
Show Gist options
  • Save adamfairholm/5444337 to your computer and use it in GitHub Desktop.
Save adamfairholm/5444337 to your computer and use it in GitHub Desktop.
New pagination options in PyroCMS 2.2.1
// You can specify two new things in streams for PyroCMS 2.2.1:
// 1. pag_uri_method - Set it to 'query_string', so you can do /my-uri?page=2. Defaults to segment - /my-uri/2.
// 2. pag_method - Allows you to set if the value in the URI should be the offset or the page number.
{{ streams:sample paginate="yes" pag_uri_method="query_string" pag_method="page" }}
<p>{{ var }}</p>
{{ /streams:sample }}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment