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 →

Number of views of pages

Started by Usk70 9 years ago · 2 replies · 1868 views
9 years ago

Is there any plugin or workaround to get or sort pages by the number of times they have been viewed?
I am trying to get a "popular" category in a blog with Grav.

Thanks,

9 years ago

Documentation says:

The full view count data is dumped as an associative array (i.e., route => count) into the Twig variable viewcounts. To support backwards compatibility, the counts are also still dumped into the config.plugins.count-views.counts namespace, but this is now officially deprecated and will be removed in a future major release.

How can I get in a TWIG template the most viewed page? -maybe it is obvious from the docs but I am quite new to Grav-

Thanks,

Suggested topics

Topic Participants Replies Views Activity
General · by themetman, 23 hours ago
2 40 16 hours ago
General · by Hanns Mattes, 1 week ago
0 121 1 week ago
General · by Karmalakas, 1 week ago
2 185 1 week ago
General · by Hanns Mattes, 3 weeks ago
0 235 3 weeks ago
General · by Dima, 4 weeks ago
1 211 4 weeks ago