0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-01-27 22:49:56 -05:00
ghost/core/server/helpers
Paul Adam Davis 503f359aab Add plural handlebars helper
Closes #3414

- Adds a helper which shows a select string deopending on the number of items provided

```
{{plural pagination.total empty='No posts' singular='% post' plural='% posts'}}
```
If `pagination.total` == 0, output 'No Posts'
If `pagination.total` == 1, outputs `1 Post`
If `pagination.total` ==  2 or more, outputs `2 Posts`

Credit to @sebgie for making this work.
2014-07-29 11:40:31 +01:00
..
tpl Updated pageUrl helper to page_url 2014-02-20 15:29:14 -06:00
index.js Add plural handlebars helper 2014-07-29 11:40:31 +01:00
template.js Add distinct error classes 2014-05-09 12:11:29 +02:00