docs
docs copied to clipboard
Comment about getting random content
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. :)
Related to https://github.com/bolt/bolt/issues/5067
@ping @bobdenotter

^ hint for @peterboorsma ;-)