Thanks, now I unterstand!
@FabianSperrle
Alternatively you can change the path of the kirbystats-directory, so that the data is stored outside of /content/
.
Then give the hint in the readme.md
: The new kirbystats-directory has to be writable by the webserver.
Just to take this a bit further (I know it’s old). I would like to display a list of the most popular posts. Is this still the best way to go about it?
If so, how can I get not only a list of page counts but also the name of the page etc so I can build links to them?
As @fitzage said:
“I basically just need to sort by hits, and pull the top pages, and filter by whether they’re part of the blog. Once I get that data from the kirbystats page, I should be able to do all that.”
I started playing with this:
$kirbystats = page('kirbystats');
$hits_per_page = $kirbystats->pages()->yaml();
but I couldn’t figure out how to get the page name/url. I think trying to use the word ‘count’ is problematic as it tries to call the count function??
Any help much appreciated.
It’s a long time since I had a look at this plugin. What do you get if you
var_dump($hits_per_page);