Outputting the total number of Records for a contentType
If you wish to output the total number of Records in a given Contenttype, you might want to do this:
{{ records|length() }}
This will not give the correct result, though. It'll output the number of records on the current page, as configured.
Because records
is actually a Pagerfanta Object, the desired number can be fetched using nbResults
, as documented in the Pagerfanta documentation.
{{ records.nbResults }}