I have general question - its not problem yet but i have site which creates about 10 new events a month. I would like to archive past events somehow so they dont show up in big pile of outdated events.
The only idea that i got is use cron script to move past events pages somewhere else (like subfolder archive). The problem with that are urls. I would like to have events to have same urls. I just dont want panel users to see the old events in panel. Even more precisely - i want them to be able to see all events (event the past ones) if they wish too but by default just show the current ones.
I guess i would need some kind of panel field that would allow showing pages by dates… i guess something like this https://github.com/molocLab/kirby-calendar-board but not only for structure fields…
Ok since nothing like that exists i guess i have to write it myself so i guess ive answered my question.
This could work, but then i get to whole other issue of duplicate urls since panel wont be able to prevent users from inserting already existing event names (this could happen very easily in my case).
I guess its good idea to have some kind of field for generaly listing and sorting bigger amount of subpages. Ive just never written field before.
I think in your case I wouldn’t use a field but a widget or even use a new page in the panel which would allow you to filter pages (e.g. using datatables. js).
This might be good idea. Since i am actualy using your field on the site.
But since the update (i used the older field before rewrite) i get thes errors
array_filter() expects at most 2 parameters, 3 given
which i cant seem to debug so i rolled back.
It has become quite more challenging to figure out the plugin although you got lot of docs it is becoming complicated. Suprisingly since the version before worked instantly.
Could you please send me a copy or a stripped copy of your project which produces this error? I know this problem but was not able to debug/fix it because I could not reproduce this error.
I never realized i use ancient php version 5.5.38 on my desktop(never bothered to update osxs bundled php). It works just fine on server runing 7.10 and even gives some error messages.
Since most of the syntax changes came in 5.6 i switched to 5.6 and indeed the plugin is 5.6+ could you put it to readme requirements? I think when people see it they atleast check if thats not their problem. I would be wasting time with going over and over through docs without realizing this.
Such a stupid obvious mistake. Thanks awesome plugin.
I made quick example how to utilize the sortable field.
Just put it into site/plugins/sortable-events and you can use the events field in your blueprints.
No I am glad that I could help. Please let me know if you have any problems getting into the plugins code. The documentation is not perfect at the moment but I appreciate suggestions on what should be added or changed in the docs to make it more understandable.
If you git clone it then give it right name sortable-events (same as the first php file of the plugin, this is kirby convention sortable-events.php in this case).
Also you need to have sortable plugin installed aswell this one just extends it.
And also dont expect it do do much, it was just blank start @lukaskleinschmidt was kind to provide for me (showing how to extend sortable field).