Collection:Count Tag

This tag is a clone of the collection tag but with one big difference: it only returns the total number of entries that match your set of filters.

Overview

This tag’s only purpose is to fetch the number of the entries in a collection that match your set of filtering parameters without the need for a tag pair/loop.

Example

There are {{ collection:count in="pogs" }} pogs in this site.
There are 6201 pogs in this site.

You could do the same thing inside a regular collection tag by aliasing the results to a single variable and using the count modifier.

{{ collection:blog as="entries" }}
There are {{ entries | count }} pogs in this site.
{{ /collection:blog }}

Parameters

in|from string

The collection in which to count entries.

* inherit

All parameters available on the collection tag are available.

Betterify this page on Github!