docs icon indicating copy to clipboard operation
docs copied to clipboard

Comment about getting random content

Open peterboorsma opened this issue 9 years ago • 3 comments

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. :)

peterboorsma avatar Jan 29 '16 10:01 peterboorsma

Related to https://github.com/bolt/bolt/issues/5067

bobdenotter avatar Apr 04 '16 17:04 bobdenotter

@ping @bobdenotter

GwendolenLynch avatar Feb 24 '17 04:02 GwendolenLynch

screen_shot_2017-02-23_at_15_51_42

^ hint for @peterboorsma ;-)

bobdenotter avatar Feb 24 '17 09:02 bobdenotter