Hello everyone, first-time poster here :-)
I'm trying to output the number of books an Author has written. I want to end up with the following:
Author X has no books
or
Author X has 1 book
or
Author X has n books
After searching around, I thought I'd try the `<$reveal>` widget to compare a number returned by a `<$filter count>`. Here's what I have on each Author's page by using a `{{||template}}`, each book page has an `author` field with the author's name:
```
<$set name="bookCount" filter="[author{!!title}count[]]">
<$reveal type="eq" default=<<bookCount>> text=0>
No books
</$reveal>
<$reveal type="eq" default=<<bookCount>> text=1>
<<bookCount>> book
</$reveal>
<$reveal type="gt" default=<<bookCount>> text=1>
<<bookCount>> books
</$reveal>
</$set>
```
The above works but only for more books than 1 (the final, `gt` clause). If it's 0 or 1 books, nothing is returned.
What am I missing?
I'm on TW 5.1.23, running through Node.js and I'm using Firefox and Edge.