Comment about getting random content
Open
- Dominant language
- PHP
- Stars
- 45
- Forks
- 189
- PR merge metrics
- No merged PRs in 30d
Description
The docs page on https://docs.bolt.cm/templatetags gives a list of example queries, i.e. this one:
> quote/random/5 - get 5 random quotes
But if you want to show just one, you'd think you can do this:
_quote/random/1_
That's not the case. If you want to fetch just one record, you have to do something like this:
`{% setcontent myrecord = 'myrecord/random/1' returnsingle %}`
The 'returnsingle' has to be used when fetching a single record in this example.
In my opinion this needs to be mentioned in the docs. :)
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.