On Your Site
Local Development
Site Code
Guides
Site Configuration
Content Management
Forms
Form API
Templates
Content Management
Totaliser
You can add a content managed totaliser to your templates using the totaliser
template function.
Example
{{ totaliser('totaliser', 'bar') }}
In our example, the totaliser template function accepts totaliser
as the name
parameter, bar
as the type parameter. The totaliser template function also
accepts a third parameter of the type array which supports the following keys:
Name | Description | Default |
---|---|---|
currency | The currency to use for the totaliser | GBP |
header_format | The format for the header | <li>£%s</li> |
data_format | The format for the each item of data rendered | <li></li><li></li> |
start | When to start the totaliser | 0 |
step | The monetary value of each step | 25000 |
steps | The number of steps in the totaliser | 4 |
decimals | The number of decimal places to show | 0 |
currency_totaliser | Is this a curreny totaliser | 1 |
dec_point | What to seperate decimals with | . |
thousands_sep | What to seperate thousands with | , |
offline_total | The amount raised offline | 0 |