Generate VCF-Files from Panel


i have a question if the following workflow is possible:
I use kirby for a business website. And there are employees with contact-data. The plan is, that there vcf is under their personal information. At the panel the admin can insert all relevant information about an employee. that works fine. But is it possible, that I can save this data not only in the txt but also in an vcf at the same moment? The admin press “save” and the data will written in the txt AND in the vcf?

Anyone an idea or a link where I can start?

Thank you!


Yes, sure, see this post: Generating vCard (vcf)

Wow, thank you!


Sorry, but there is one more question (at this time).

The link at the other thread goes to “routing”. Is it right, that routes will generate the vcf (in my case) at runtime? So, if I have 30 persons, kirby will generate 30 vcf?

If this is true: my idea was to generate them while I edit and save the content at the panel.
If this false: I didn’t understand the routing…

Can you help, please?


If you want to create a VCF file when an event is triggered through the Panel, you can use a` hook. However, I would stick with the route that generates the file on the fly. You don’t want to create 30 files at once, do you?

Well, if I do it at the runtime (page request) I will. I have a list of employers (at the moment 25) and all of them have a vcf for download. Thats why I want to do this at the panel. Because then I only generate one file at the moment I update/enter a employee.

So, for my understanding: A hook give me the possibility to do this (via*)?

Yes, as I said, the hook is triggered, when a page is updated in the panel.

But again, when you use a route for an individual employer, you wouldn’t create 25 or 30 files at the same time. Each vcard for each employer would be created when you click the link to its vcard.

Ah! So I didn’t understand this part…
I thought the router works if the page (with all the vcf-links) is requested by visitor.

Now, router are a good idea!

Thank you. :slight_smile:

1 Like