Question about IPCount Plugin

In the documentation for the IPCount Plugin (located in the repo) - there is a section that seems to be explaining how to create a page with a chart showing page hits. It says:

To show the visitor count in a bar chart, create a new page using the visitors.html.twig template. E.g. /user/pages/03.chart/

I have looked a the twig, and is seems pretty straight forward. I am just not sure what the instructions are implying with the example page. I am not sure how I display a twig file in a markdown file. I might just be braindead. What am I missing here?


@bjaz , the mentioned procedure is just the standard recommended way for creating pages based on a specific template:
create a new page and select the template ‘visitors’ from the dropdown, so the markdown file will be named
as a result, the page will be based on the template visitors.html.twig from the plugin.
you can even custumize/modify this to your needs by making a copy of the template and save it in your theme’s templates folder, under the same name, and then modify that copy.

I do not see that template when trying to do this.

I copying the twig file to site/user/themes/quark/templates/partials as well as site/user/themes/quark/templates, but that template does not seem to be available.

I verified that I have installed it, and I am getting counts displayed in my footer where I embedded the basic display.


duh, you are right,
currently, the template ‘visitors’ is not registered correctly, so it cannot be selected in the page template dropdown.
it will work, however, by just naming the page file .
I’ll fix this in the near future and create a new plugin version.
thanks for reporting !

there is now an updated Version at Github which allows the Selection of the Visitors Template from the Grav Admin - please check if this works for you.

Many thanks for the very prompt and very adequate response to bjaz’s question. I was about to ask the same because I experienced the same confusion.

The new version already appeared as update in de plugins overview and it works totally as expected. Thanks a lot again!

One sneaky sidenote: The IPCount visitors page needs JQuery, which is not present in very minimal themes like ‘Hypertext’. So I loaded the JQuery script somewhere in the header twig files, et voilá.

ok, fine to see the update is appreciated :grinning: - and, yes, the chart feature of the visitors page needs JQuery - maybe I’ll add a check/automatic loading in the next version…