Answers.Body: <p>You should be able to use <code>paginate</code>. In my installation, I paginate through blog articles:</p>
  
  <pre><code>{% paginate craft.entries.section('articles').limit(4) as pageInfo, articles %}
  </code></pre>
  
  <p>Then, you can just access them as usual:</p>
  
  <pre><code>{% for article in articles %}
      {{ article.title }}
  {% endfor %}
  </code></pre>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-12-07T11:53:17.480Z
Answers.Text: I am looking to paginate my custom records, so I cant use craft.entreis to fetch my own objects.
Answers.UserDisplayName: Syversen
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-12-06T16:16:29.217Z
Answers.LastActivityDate: 2017-12-06T16:16:29.217Z
Answers.UserDisplayName: Adam Hopkinson
Body: <p>I'm creating a custom plugin for customer reviews on products. 
  In the CP I have an interface to view and aprove these. What I am wondering is if it is any easy way to paginate my records? Right now on my index page Im just calling a twig extension that does a DB query for all rows in a review table. When this table gets bigger I might have performance and UX issues listing all the comments in one go.</p>
  
  <p>Any help would be appreciated.</p>
  
Tags: <plugin-development><templating><records>
Title: Paginate records?
ThreadText: # Paginate records?
  
  (Asked by: username_0 on 2017-12-06)
  
  I'm creating a custom plugin for customer reviews on products.
  In the CP I have an interface to view and aprove these. What I am wondering is if it is any easy way to paginate my records? Right now on my index page Im just calling a twig extension that does a DB query for all rows in a review table. When this table gets bigger I might have performance and UX issues listing all the comments in one go.
  
  Any help would be appreciated.
  
  **Tags:** plugin-development, templating, records
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2017-12-06. Score: 1
  
  You should be able to use `paginate`. In my installation, I paginate through blog articles:
  
  ```
  {% paginate craft.entries.section('articles').limit(4) as pageInfo, articles %}
  
  ```
  
  Then, you can just access them as usual:
  
  ```
  {% for article in articles %}
      {{ article.title }}
  {% endfor %}
  
  ```
  
  > **Comments:**
  > **username_0**: I am looking to paginate my custom records, so I cant use craft.entreis to fetch my own objects.  
  
  ---
  
  