Hi!
I’m posting this in the Kirby 4 forum because I’m developing a new website using Kirby v4 RC1, but my problem is not related to Kirby 4 itself. If that’s an issue I can move it.
Here’s my question:
The website I’m developing will have its content imported from another website. The best way to import the thousands of pages will be to generate the .txt content files with an external script.
My data structure uses the uuid property to link event pages to speakers: the uuid for the speaker is stored in the .txt content file for the event.
It makes sense for me to use the ID that already exists in the db, so that I don’t need to query Kirby for speakers UUIDs in order to create the content files for event pages. If a short numerical ID isn’t recommended at least I can generate a more complex string using the ID as seed instead of randomness.
My question is: when importing the data, is it risky use my own way to generate UUIDs for speakers?
I had to set up today a import with a import plugin I wrote.This code import pages, childpages and grandchildpages form a typo3 sql database.
I got there stucked by using uid as parameter to findBy. So, that’s not what I deal with daily, but in my case, I just rename it to ‘importuid’ and use it
$contentArray['uuid'] = Uuid::generate();
to add to my array of my sql content the normal uuid generator form kirby.
So i prefer that way - but as I wrote at the beginning im not the import expert
It doesn’t really matter, the important thing is that this “UUID” is unique. You can still use our standard UUIDS or your custom UUIDs for all other pages generated afterward.
As long as there is a UUID field filled in the content file, Kirby will take this and not regenerate anything. So mixing them is no problem.