I have a Database with several columns. One of the column has a reference to an image (e.g. c3f7d6a95fe3d55bf4d41a53a99933b9.jpg)
The files are downloaded & imported using a different script and exist within kirby [located in /content/c3f7d6a95fe3d55bf4d41a53a99933b9.jpg using site()->createFile()]
Using the content from a database guide, I created the model and can access the database content, but I can’t seem to manage to add those files to the page?
I’ve seen that there is an option of 'files' for the Pages::factory, but I could not figure out how to add files?
If your files are stored in the site object, they are not part of the current page. So you need a reference to your file (the filename) in the content in some field of your choice, then in your template you can fetch it by filename from the site object.
How can I reference this in the field? I want it to be shown (linked?) within the panel, also to use it as preview image for the site etc?
Or: how can I make it part of the current page? Without having to create the page within the filesystem (or using mixed mode) and keeping everything within the database?