<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>

CC BY-SA 3.0
2017-12-07T11:53:17.480Z
I am looking to paginate my custom records, so I cant use craft.entreis to fetch my own objects.
Syversen
CC BY-SA 3.0
2017-12-06T16:16:29.217Z
2017-12-06T16:16:29.217Z
Adam Hopkinson
<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>

<plugin-development><templating><records>
Paginate records?
# 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.  

---

