putyourlightson / craft-entry-count

Counts and displays the number of times that an entry has been viewed in Craft CMS.
MIT License
47 stars 19 forks source link

Entry Count with the {% paginate %} tag #14

Closed tcherokee closed 6 years ago

tcherokee commented 6 years ago

Is there a way to use the plugin with the {% paginate %} tag? So something like this

{% paginate craft.entryCount.entries.all() as pageInfo, entries %}

I tried this tag, but got this error

Argument 1 passed to craft\helpers\Template::paginateCriteria() must implement interface craft\elements\db\ElementQueryInterface, array given

putyourlightson commented 6 years ago

Try it without the .all() at the end.

tcherokee commented 6 years ago

That worked :)

putyourlightson commented 6 years ago

Great!