Closed alFlash closed 3 years ago
they are just plain kirby text or hidden fields. i usually have blueprints for them and extend them in my target pages blueprints. like this...
site/blueprints/fields/viewcount.yml
type: number
min: 0
default: 0
disabled: true
label: Visit Count
site/blueprints/fields/lastvisited.yml
type: hidden
in your page blueprint
fields:
viewcount:
extends: fields/viewcount
lastvisited:
extends: fields/lastvisited
Thank You!
Hi, is it possible to provide a little bit more details to setup the plugin?
I copied the plugin files to the plugin folder I configured the config.php to file to use the page fields
return [ 'bnomei.pageviewcounter.field.count' => 'viewcount', 'bnomei.pageviewcounter.field.timestamp' => 'lastvisited', 'bnomei.pageviewcounter.counter' => function () { return new \Bnomei\PageViewCounterField(); },
I wrote the tracking image code in my footer snippet.
What I have to do in my blueprints to see the viewcount and the lastvisited field in the panel?
Sry for my bad English. Thank You!