Skip to content
● Meet Grav Guard: keep every Grav site you run secure and up to date, all from one place. Free for up to 3 sites. Read more →

Random page from collection

Started by Usk70 9 years ago · 1 replies · 1225 views
9 years ago

Given a collection -i.e.-:

page.find('/blog').collection({'items': '@self.descendants','order': {'by': 'date','dir': 'desc'}})

Is it possible to get a random page from that collection inside a twig template?

Thanks,

Suggested topics

Topic Participants Replies Views Activity
Support · by Anna, 23 hours ago
1 32 21 hours ago
Support · by Anna, 2 weeks ago
1 231 2 weeks ago
Support · by webmasterodp, 1 month ago
4 362 1 month ago
Support · by nwhitfield, 1 month ago
2 335 1 month ago
Support · by stell, 1 month ago
5 625 1 month ago