b:getcount

<b:getcount />

Gives the number of found items

<b:getcount> returns the number of found items from a data model. If where and parent attributes are not defined, you will get the total number of items in the given data model.

Attributes

from

The data model from which you want to count items.

parent

(optional)

Limits the count to items that are under the given parent url.

where

(optional)

Limits the count to items that match the given condition.

Examples

Basic example

This counts how many pages there are in the whole site.
Amount of pages <b:getcount from="page"/>

Using parent

This counts how many articles are under the current page.
We feature
<b:getcount from="article" parent="<b:page.metadata.path/>" />
articles on this subject.